Skip to content

Instantly share code, notes, and snippets.

View fulcanelly's full-sized avatar
🎯
Focusing

fulcanelly

🎯
Focusing
View GitHub Profile
@chrisdone
chrisdone / Printf.idr
Last active May 27, 2024 13:01
Type-safe dependently-typed printf in Idris
module Printf
%default total
-- Formatting AST.
data Format
= FInt Format
| FString Format
| FOther Char Format
| FEnd
@fulcanelly
fulcanelly / ruby-fibers.rb
Last active January 6, 2022 03:48
The ruby fibers somehow similar to haskell's free monads
class FiberDSL
def expect regex
Fiber.yield({regex:})
end
def reply text
Fiber.yield({reply: text})
end
end