haskell - How can I get nth element from a list? -
how can access list index c code haskell list?
int a[] = { 34, 45, 56 }; return a[1];
look here, operator !!
.
i.e. [1,2,3]!!1
gives 2
, since lists 0-indexed.
how can access list index c code haskell list?
int a[] = { 34, 45, 56 }; return a[1];
look here, operator !!
.
i.e. [1,2,3]!!1
gives 2
, since lists 0-indexed.
Comments
Post a Comment