Code not working. Printing out a few specific elements from a list

前端 未结 0 827
隐瞒了意图╮
隐瞒了意图╮ 2020-12-21 07:33

Task:

pirmieji(S,K,R) R is the first K elements of S

Example:

?- pirmieji([a,b,c,d,e],3,R).

R = [a,b,c].


My code:

pi         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题