Idris-dev/test/literate001/Lit.lidr
2014-01-30 17:24:08 +00:00

20 lines
417 B
Idris

> module Lit
Test some string primitives while we're at it
> st : String
> st = "abcdefg"
Literate main program
> main : IO ()
> main = do { putStrLn (show (strHead st))
> putStrLn (show (strIndex st 3))
> putStrLn (strCons 'z' st)
> putStrLn (reverse st)
> let x = unpack st
> putStrLn (show (reverse x))
> putStrLn (pack x)
> }