mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-11-15 01:25:05 +03:00
20 lines
417 B
Idris
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)
|
|
> }
|
|
|