Open yif042 opened 4 years ago
https://duanyifu.com/2016/08/26/PIHex4/
Programming in Haskell是一本入门Haskell的好书,介绍页面以及配套的slides, vedios, codes都在这里。 定义 halve 12halve :: [a] -> ([a], [a])halve a = let n = (length a) div 2 in (take n a, drop n a) 用三种方式定义safetail 12345678
div
https://duanyifu.com/2016/08/26/PIHex4/
Programming in Haskell是一本入门Haskell的好书,介绍页面以及配套的slides, vedios, codes都在这里。 定义 halve 12halve :: [a] -> ([a], [a])halve a = let n = (length a)
div
2 in (take n a, drop n a) 用三种方式定义safetail 12345678