Idris2/tests/node/node012/array.idr

12 lines
236 B
Idris
Raw Normal View History

2020-06-12 23:35:08 +03:00
import Data.IOArray
main : IO ()
main
= do x <- newArray 20
writeArray x 10 "Hello"
writeArray x 11 "World"
printLn !(toList x)
y <- fromList (map Just [1,2,3,4,5])
printLn !(toList y)