Toot

Written by Olical on 2025-01-21 at 14:02

The tail! marker gives you compile time checking that you haven't broken a tail call!

(fn process-all [data i]
  (case (process (. data i))
    :done (print "Process completed.")
    :next (process-all data (+ i 1))
    :skip (do (tail! (process-all data (+ i 2)))
;;             ^^^^^ Compile error: Must be in tail position
              (print "Skipped" (+ i 1)))))

=> More informations about this toot | View the thread | More toots from Olical@mastodon.social

Mentions

Tags

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113866712661931775
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
280.413709 milliseconds
Gemini-to-HTML Time
0.302406 milliseconds

This content has been proxied by September (3851b).