Does F# have an equivalent to Haskell's take?
Posted
by McMuttons
on Stack Overflow
See other posts from Stack Overflow
or by McMuttons
Published on 2010-04-13T20:08:27Z
Indexed on
2010/04/13
20:13 UTC
Read the original article
Hit count: 160
In Haskell, there is a function "take n list" which returns the first n elements from a list. For example "sum (take 3 xs)" sums up the first three elements in the list xs. Does F# have an equivalent? I expected it to be one of the List-functions, but I can't spot anything that seems to match.
© Stack Overflow or respective owner