2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00

Abstrakte Syntax; Prolog (Listenoperationen)

This commit is contained in:
Martin Thoma 2014-04-02 19:08:06 +02:00
parent b555bae6c4
commit e42277ecda
6 changed files with 56 additions and 1 deletions

View file

@ -0,0 +1,2 @@
lengthof(L, 0) :- L == [].
lengthof([_|R], NewLength) :- lengthof(R,Length), NewLength is Length+1.

View file

@ -0,0 +1,3 @@
sort(+List, -Sorted)
msort(+List, -Sorted)
memberchk(?Elem, +List)