18 lines
853 B
Markdown
18 lines
853 B
Markdown
| *Prolog* | *Pyhon* | *Prolog Examples* |
|
|
|:-------------:|:-------------:|---------------------------------------:|
|
|
| Numbers | Numbers | 2.3
|
|
| | | 1545
|
|
| | |
|
|
| Atom | Symbols | var
|
|
| $Atom | | $var [ = var]
|
|
| `string` | 'string' | \`hello\`
|
|
| "string" | ' | "hello"
|
|
| | |
|
|
| Atom(...) | Symb(...) | f( a, b, named=v)
|
|
| E.F(...) | E.F (...) | mod.f( a) |
|
|
| Atom() | | f() [ = '()'(f) ]
|
|
| Lists | Lists | [1,2,3]
|
|
| t(....) | Tuples | t(1,2,3) to (1,2,3)
|
|
| (..., ...) | | (1,2,3)[ = (1,(2,3))]
|
|
| {.=., .=.} | Dict | {\`one\`: 1, \`two\`: 2, \`three\`: 3}
|