Skip to content

Instantly share code, notes, and snippets.

@jasonnyberg
Created March 8, 2017 16:20
Show Gist options
  • Select an option

  • Save jasonnyberg/2cf85ac2bdb74a1d259330fe61cd8058 to your computer and use it in GitHub Desktop.

Select an option

Save jasonnyberg/2cf85ac2bdb74a1d259330fe61cd8058 to your computer and use it in GitHub Desktop.
Combination of lists:split and lists:map
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