$ echo >> /tmp/foo
$ echo 6 7 >> /tmp/foo
- :- load m = matrix("/tmp/foo")
- :- sol
+ > load m = matrix("/tmp/foo")
+ > sol
Solution
========
different type simple passing a function which will convert strings to the
appropriate time (e.g. str, int, float).
- :- load m = matrix("/tmp/foo", astype=str)
- :- sol
+ > load m = matrix("/tmp/foo", astype=str)
+ > sol
Solution
========
"""
Load tab-delimited files.
- :- load row = tsv("test/repl/english.gr")
- :- sol
+ > load row = tsv("test/repl/english.gr")
+ > sol
row/4
=====
row(0,"0","S","NP VP") => true.
#
# For example,
#
-# : subscribe f(X,X)
-# :- f(1,1) := 1. f(1,2) := 2. f(2,2) := 3.
+# > subscribe f(X,X)
+# > f(1,1) := 1. f(1,2) := 2. f(2,2) := 3.
# Changes
# =======
# f(X,X):
#
# To view all subscriptions:
#
-# :- subscriptions
+# > subscriptions
# f(X):
# 1 where {X=1}
# 2 where {X=2}
For more information about a particular loader type the following (in
this case we get help for the `tsv` loader):
- :- help load tsv
+ > help load tsv
Examples:
- :- load data = tsv("examples/data/data.csv", delim=',')
- :- sol
+ > load data = tsv("examples/data/data.csv", delim=',')
+ > sol
Solution
========
data/3
For more information about a particular post processor (in this case
`save`)
- :- help post save
+ > help post save
"""
try:
We'll start with something very simple:
- :- a :- b.
- :- b :- c.
- :- c.
+ > a :- b.
+ > b :- c.
+ > c.
In our solution we see that `a` is true.
- :- sol
+ > sol
a => true.
b => true.
c => true.
Now we want to find out why
- :- trace a
+ > trace a
a => true
|
The way trace lets you know that it has omitted something is with a
message `item: shared structure see above` or `item: *cycle*`.
- :- trace bar(10,10)
+ > trace bar(10,10)
bar(10,10) => 220
|
|
└─ foo(10): shared structure see above
- :- trace a
+ > trace a
a => 2.0
|