Difference between revisions of "SubL/examples.1"

From Public Domain Knowledge Bank
Jump to: navigation, search
Line 1: Line 1:
 
==== constant-internal-id ====
 
==== constant-internal-id ====
* CYC(n): (constant-internal-id #$Lenat)
+
===== (constant-internal-id #$Lenat) =====
: [Time: 0.0 secs]
+
  CYC(#): (constant-internal-id #$Lenat)
: 1
+
  [Time: 0.0 secs]
 +
  1
  
 
==== stringp ====
 
==== stringp ====
<pre>
+
examples of use
CYC(n): (stringp "hello")
+
===== (stringp "hello") =====
T
+
CYC(#): (stringp "hello")
</pre>
+
T
==== stringp 1 ====
+
===== (stringp 1) =====
* CYC(n): (stringp 'stringp)
+
 
: NIL
+
===== (stringp NIL) =====
==== (stringp #$Dog) ====
+
CYC(#): (stringp NIL)
* CYC(n): (stringp #$Dog)
+
[Time: 0.0 secs]
: NIL
+
NIL
 +
===== (stringp 'stringp) =====
 +
CYC(#): (stringp 'stringp)
 +
[Time: 0.0 secs]
 +
NIL
 +
===== (stringp #$Dog) =====
 +
CYC(#): (stringp #$Dog)
 +
[Time: 0.0 secs]
 +
NIL
 
==== numberp ====
 
==== numberp ====
 +
===== (numberp 1) =====
 
   (numberp 1)
 
   (numberp 1)
 +
[Time: 0.0 secs]
 
   T
 
   T
 
+
===== (numberp #$Lenat) =====
  CYC(29): (numberp #$Lenat)
+
  CYC(#): (numberp #$Lenat)
 
  [Time: 0.0 secs]
 
  [Time: 0.0 secs]
 
  NIL
 
  NIL
 
+
==== constantp ====
  CYC(30): (constantp #$Lenat)
+
===== (constantp #$Lenat) =====
 +
  CYC(#): (constantp #$Lenat)
 
  [Time: 0.002 secs]
 
  [Time: 0.002 secs]
 
  T
 
  T
 +
==== print ====
 +
===== (print "hello") =====
 +
CYC(#): (print "hello")
 +
"hello" [Time: 0.002 secs]
 +
"hello"
 +
===== (print stringp) =====
 +
CYC(#): (print stringp)
 +
Error: STRINGP is not bound.
 +
===== (print #$Lenat) =====
 +
CYC(#): (print #$Lenat)
 +
 +
#$Lenat [Time: 0.0 secs]
 +
#$Lenat

Revision as of 02:14, 8 March 2019

constant-internal-id

(constant-internal-id #$Lenat)
 CYC(#): (constant-internal-id #$Lenat)
 [Time: 0.0 secs]
 1

stringp

examples of use

(stringp "hello")
CYC(#): (stringp "hello")
T
(stringp 1)
(stringp NIL)
CYC(#): (stringp NIL)
[Time: 0.0 secs]
NIL
(stringp 'stringp)
CYC(#): (stringp 'stringp)
[Time: 0.0 secs]
NIL
(stringp #$Dog)
CYC(#): (stringp #$Dog)
[Time: 0.0 secs]
NIL

numberp

(numberp 1)
 (numberp 1)
[Time: 0.0 secs]
 T
(numberp #$Lenat)
CYC(#): (numberp #$Lenat)
[Time: 0.0 secs]
NIL

constantp

(constantp #$Lenat)
CYC(#): (constantp #$Lenat)
[Time: 0.002 secs]
T

print

(print "hello")
CYC(#): (print "hello")
"hello" [Time: 0.002 secs]
"hello"
(print stringp)
CYC(#): (print stringp)
Error: STRINGP is not bound.
(print #$Lenat)
CYC(#): (print #$Lenat)

#$Lenat [Time: 0.0 secs]
#$Lenat