OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-sensory commits / 466ca33

Ongoing fiddling with counting
466ca33a42fe7ec0d94fa0702d0826146cb3e555
by Linas Vepstas <linas@linas.org> · 2025-12-30T06:05:03.000Z

Changed files (1) +20 -1

sandbox/count.scm +20 -1
……@@ -29,4 +29,23 @@
2929
3030(cog-execute! get-all-queries)
3131
32
32(define get-types
33 (Filter
34 (Rule
35 (TypedVariable (Variable "$atom") (Type 'Atom)) ; vardecl
36 (Variable "$atom") ; body - accept everything
37 (TypeOf (DontExec (Variable "$atom"))))
38 get-all-atoms))
39
40; Should work just like `get-all-types` Query above.
41(cog-execute! get-types)
42
43(define count-types
44 (Filter
45 (Rule
46 (TypedVariable (Variable "$typ") (Type 'Type)) ; vardecl
47 (Variable "$typ") ; body - accept everything
48 (IncrementValue (Variable "$typ") (Predicate "cnt") (Number 0 0 1)))
49 get-types))
50
51(cog-execute! count-types)