Last active
June 19, 2018 12:01
Revisions
-
cppxor2arr revised this gist
Jun 19, 2018 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ f :: Num a => [a] -> [a] f [] = [] f [x] = [] f [x1,x2] = [x2-x1] f (x1:x2:xs) = x2-x1:f (x2:xs) -
cppxor2arr revised this gist
Jun 13, 2018 . 1 changed file with 1 addition and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,3 @@ f :: Num a => [a] -> [a] f [x1,x2] = [x2-x1] f (x1:x2:xs) = x2-x1:f (x2:xs) -
cppxor2arr created this gist
Jun 13, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ main :: IO() main = do print . f $ map sqrt [1..20] f :: Num a => [a] -> [a] f [x1,x2] = [x2-x1] f (x1:x2:xs) = x2-x1:f (x2:xs) f _ = []