4 ms·
Python solutions to the 99 Prolog Problems
- mustpax 17y ago"99 Prolog Problems" is a set of problems to solve in Prolog to teach yourself the language. It works well as an educational tool in other languages as well. Original problem set: https://prof.ti.bfh.ch/hew1/informatik3/prolog/p-99/ https://prof.ti.bfh.ch/hew1/informatik3/prolog/p-99/
- mrshoe 17y agoMakes it look easy. Python is poetry in $EDITOR.
- ErrantX 17y agoThis kind of stuff is Python's strength :)
- swolchok 17y agoIn Lisp: http://www.ic.unicamp.br/~meidanis/courses/mc336/2006s2/funcional/L-99_Ninety-Nine_Lisp_Problems.html http://www.ic.unicamp.br/~meidanis/courses/mc336/2006s2/func... In Haskell: http://www.haskell.org/haskellwiki/H-99:_Ninety-Nine_Haskell_Problems http://www.haskell.org/haskellwiki/H-99:_Ninety-Nine_Haskell... I found that actually solving these in Haskell reduced to "how familiar are you with the standard library"". It seems to be very similar in Python.
- mbrubeck 17y agoThe simple 13-line Haskell solution to P27 is an interesting contrast to the 27-line Python solution with its two layers of indirection. The Haskell solution is much more declarative. (If you ported some of the Haskell Prelude to Python you might be able to write something similar, though without the nice List Monad syntax.)
- hubb 17y agoJust to note, only the first 50 have been solved in python as yet.
- cschep 17y agoIf you're having language problems I feel bad for you son, I got 99 prolog problems and python ain't one.
- draegtun 17y agoIn Perl6: http://github.com/perl6/perl6-examples/tree/9720129dd09936b026ed1f539c2fa25dde316104/99-problems http://github.com/perl6/perl6-examples/tree/9720129dd09936b0... See also: http://www.oreillynet.com/onlamp/blog/2006/12/99_problems_in_perl_6.html http://www.oreillynet.com/onlamp/blog/2006/12/99_problems_in...