형이 요즘 읽고 있는 책 코드 일부


schedule(Start, Destination, [ depart(Start), arrive(Next) | Rest]) :-

list(Rest),

sail(Start, Next),

rest_schedule(Next, Destination, Rest).


rest_schedule(Place, Place, []).


rest_schedule(CurrentPlace, Destination, [arrive(Next) | Rest]) :-

sail(CurrentPlace, Next),

rest_schedule(Next, Destination, Rest).


rest_schedule(Place at Time1, Destination, [stay(Place, Time1, Time2) | Rest]) :-

sail(Place at Time2, _),

before(Time1, Time2),

schedule(Place at Time2, Destination, Rest).



선언적 프로그래밍 일종인 로직 프로그래밍 이라는 건데, 니가 재귀 개념이 없으면 이거로는 프로그래밍 불가 ㅋ


한줄요약:

날고 긴다하는 뛰어난 닝겐들이 생각해낸 개념을 이해하지 못하면 너는 뭐다?