Last active
September 13, 2016 08:59
-
-
Save turboMaCk/8197df305cdbf6699d460b378605e80c to your computer and use it in GitHub Desktop.
Hits for wojcek
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
import Html exposing (..) | |
import List exposing (..) | |
multiSnd : number -> (List (a, number) -> List (a, number)) | |
multiSnd k = | |
map (\(a, b) -> (a, b*k)) | |
multiSnd3 = multiSnd 3 | |
multiSnd4 = multiSnd 4 | |
permuteWithSelf : List a -> List (a, a) | |
permuteWithSelf list = | |
let | |
forHead h prevRes = | |
foldr (\a acc -> (h, a)::acc) prevRes list | |
in | |
foldr (\a acc -> forHead a acc) [] list | |
main : Html msg | |
main = | |
permuteWithSelf [1..100] |> toString |> text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment