haskell memo
コンテンツ
h = 1:map (2*) h # map (3*) h # map(5*) h where xxs@(x:xs) # yys@(y:ys) | x==y =x:(xs#ys) | x<y =x:(xs#yys) | x>y =y:(xxs#ys) prime = let p (x:xs) =x:(p (filter ((/=).(flip rem x)) xs)) in p [2..] fib = :1:[i+j|(i,j)<-zip fib $tail fib]
作成者 Toru Mano
最終更新時刻 2023-01-01 (c70d5a1)