TypeScript and Playground練習問題集更新情報
WIP
TypeScript and Playground練習問題集更新情報
WIP
In the language specification, the translation rule of do! e; is defined as follows:
T(do! e;, V, C, q) = T(let! () = src(e) in b.Return(), V, C, q)
And the signature of Return is usually 'a -> M<'a>, so the type of do! e; results M<unit>.
| (* 完全数: 自分自身を除く約数の和がその数自身になる *) | |
| (* n以下の整数一覧を並べたリスト *) | |
| (* enumerate: int -> int list *) | |
| let rec enumerate n = if n <= 0 then [] else n :: enumerate (n-1) | |
| (* n 以下の完全数をリストで返す *) | |
| (* perfect : int -> int list *) | |
| let perfect n = | |
| let perfectp n = |