You're the only one who can explain recursion in prolog in such a great visual manner. Thanks a lot!
@mohamedsoltani2909 ай бұрын
Yes this guy is awsome
@mylesmontclair5 жыл бұрын
That was such a great example of recursion. Thanks!
@techdose4u5 жыл бұрын
:)
@avengersmarvelheroes4570 Жыл бұрын
You explained the recursion very well Thanku so much 😊
@techdose4u Жыл бұрын
Welcome :)
@yujiayang88743 жыл бұрын
I would like you say you are YYDS! which in Chinese it means forever god. to express my appreciation.
@varunkumar72372 жыл бұрын
Very nicely explained, thanks a lot
@Mike-mb2yx3 жыл бұрын
Thanks for the explanation! Well put, great example.
@pedrorebelo66713 жыл бұрын
Great explanation!
@techdose4u3 жыл бұрын
Thanks 😊
@vipnirala5 жыл бұрын
Just awesome😍
@h.iq.975 жыл бұрын
thanks a lot, that was very helpful
@techdose4u5 жыл бұрын
Welcome :)
@kardahim69293 жыл бұрын
I make small modifications to the list. sumlist([],0). sumlist([H|T],N) :- number[H], sumlist(T,N1), N is N1 + H, !; \+ number(H), sumlist(T,N).
@abdullahmoiz81514 жыл бұрын
thanks a lot very helpful
@techdose4u4 жыл бұрын
Welcome :)
@akshaypatel27315 жыл бұрын
damn , awesome...thanks a lot
@techdose4u5 жыл бұрын
Welcome :)
@channadissanayaka64506 ай бұрын
Thank you very much
@techdose4u6 ай бұрын
welcome
@EnvyBeatshamstring4 жыл бұрын
I want to find repeating numbers of a given list for ex. [1,2,1,2,3,5] return is [3,5]
@MrNootka3 жыл бұрын
Can you make a video on how to duplicate the elements of a list please ^^
@pastelek34 жыл бұрын
hey bro, i've got question about code in prolog. i know its about graphs but i dont know how it works and what it does :/ can you help me? circuit(b,a). circuit(a,b). circuit(c,b). circuit(a,c). path([]). path([_]). path([X,Y|Zs]):- circuit(X,Y), path([Y|Zs]). path(X,Y).
@techdose4u4 жыл бұрын
In the circuit part, you defined your graph. The 1st path line says if you don't pass anything then there won't be any path. Second line says, if you pass one value only then path is not possible (because path needs atleast 2 nodes). Now path([X,Y|Zs] checks if it is possible to reach to Zs from X via Y. This will only be possible if we can reach to Y from X and there exists a path from Y to Zs. So circuit(X,Y) means we have a path from X to Y (it will be checked from above 4 facts) and path(Y|Zs) is a recursive call which will find if a path exists from Y to Zs. I hope you got it now :)
@pastelek34 жыл бұрын
@@techdose4u so all in all program checks whether there is path between two nodes, right? but i still dont know how can i call this function. can you give me an examplary calling of function? should i only do e.g path(a,c) and its done? and another question - can we have two elements in head of list in prolog? im refering to this: "path([X,Y|Zs]). both X,Y are in head of the list :/
@pastelek34 жыл бұрын
@@techdose4u can you help one more time? please :(
@aditisinghxd2 жыл бұрын
How can I reverse a list without using an inbuilt function?
@mariamash37794 жыл бұрын
Thank you
@techdose4u4 жыл бұрын
Welcome
@ashishkonagalla18314 жыл бұрын
I literally have the exact same code and its giving me error: false