Created
March 8, 2017 16:20
-
-
Save jasonnyberg/2cf85ac2bdb74a1d259330fe61cd8058 to your computer and use it in GitHub Desktop.
Combination of lists:split and lists:map
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| splitmap(F,L,N) when length(L)>N -> {L1,L2}=lists:split(N,L), [F(L1) | splitmap(F,L2,N)]; | |
| splitmap(F,L,_N) -> F(L). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment