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:
parent
b555bae6c4
commit
e42277ecda
6 changed files with 56 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
lengthof(L, 0) :- L == [].
|
||||
lengthof([_|R], NewLength) :- lengthof(R,Length), NewLength is Length+1.
|
|
@ -0,0 +1,3 @@
|
|||
sort(+List, -Sorted)
|
||||
msort(+List, -Sorted)
|
||||
memberchk(?Elem, +List)
|
Loading…
Add table
Add a link
Reference in a new issue