Skip to content

Instantly share code, notes, and snippets.

@masakielastic
Created January 17, 2012 03:46
Show Gist options
  • Save masakielastic/1624509 to your computer and use it in GitHub Desktop.
Save masakielastic/1624509 to your computer and use it in GitHub Desktop.
take、drop、splitAt の比較
Prelude> take 10 [1..20]
[1,2,3,4,5,6,7,8,9,10]
Prelude> drop 10 [1..20]
[11,12,13,14,15,16,17,18,19,20]
Prelude> splitAt 7 [1..20]
([1,2,3,4,5,6,7],[8,9,10,11,12,13,14,15,16,17,18,19,20])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment