Comment detail

n日後を返す関数を返す関数 (Nested Flatten)

This comment is reply for 1319 katsu: クロージャとか無いので、適当な名前を付け...(n日後を返す関数を返す関数). Go to thread root.

call(foo(A), B) は call(foo, A, B) と同じなので assart/1 を使わずに以下のように書けると思います。
1
2
n_days_later_pred(N, T, R) :- R is T + N * 86400.
n_days_later(N, n_days_later_pred(N)).

Index

Feed

Other

Link

Pathtraq

loading...