Skip to content

Instantly share code, notes, and snippets.

@masakielastic
Created January 17, 2012 01:43
Show Gist options
  • Save masakielastic/1624022 to your computer and use it in GitHub Desktop.
Save masakielastic/1624022 to your computer and use it in GitHub Desktop.
takeWhile、dropWhile、span の比較
ghci > takeWhile (6>) [1..10]
[1,2,3,4,5]
ghci > dropWhile (6>) [1..10]
[6,7,8,9,10]
ghci > span (6>) [1..10]
([1,2,3,4,5],[6,7,8,9,10])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment