Created
December 1, 2017 17:28
-
-
Save ethagnawl/4a3fac90bcee97d242c11fdc54d81f2a to your computer and use it in GitHub Desktop.
This file contains 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
replicate' l = map (\n -> take n (repeat n)) l | |
replicate' [1, 2, 3] -- [[1],[2,2],[3,3,3]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment