Skip to content

Instantly share code, notes, and snippets.

View danielkroeni's full-sized avatar

Daniel Kröni danielkroeni

View GitHub Profile
main : IO ()
main = do
putStrLn $ show res
where x : Int
x = 2
add : Int -> Int
add x = x + x
res : Int
res = add 1
public export
record State where
constructor MkState
out : Int
public export
Show State where
show (MkState o ) = "State: " ++ show o
public export
@danielkroeni
danielkroeni / treemap.cairo
Last active January 20, 2021 20:50
Immutable Treemap
%builtins output range_check
from starkware.cairo.common.registers import get_fp_and_pc
from starkware.cairo.common.serialize import serialize_word
from starkware.cairo.common.math import assert_lt_felt
const false = 0
const true = 1
@danielkroeni
danielkroeni / gist:3311827
Created August 10, 2012 06:34
Progress animation in scala
Stream.continually(Seq("|","/","-","\\").map("\b" + _).toStream).flatten.foreach { c => print(c); Thread.sleep(100)}