Handbook
Glossary
lookup-type ( string -- object/string ? )
Vocabulary
tools
.
scaffold
.
private
Inputs
string
an
object
Outputs
object/string
an
object
?
an
object
Definition
USING:
alien
arrays
assocs
byte-arrays
calendar
classes
combinators.short-circuit
hashtables
help.markup
kernel
math
quotations
sequences
splitting
strings
timers
unicode
urls
words
;
IN:
tools.scaffold.private
:
lookup-type
( string -- object/string ? )
"/f"
?tail
swap
"new"
?head
drop
[
{
[
39
=
]
[
digit?
]
}
1||
]
trim-tail
H{
{
"alist"
"an array of key/value pairs"
}
{
"ch"
"a character"
}
{
"obj"
object
}
{
"seq"
sequence
}
{
"values"
sequence
}
{
"array"
array
}
{
"string"
string
}
{
"tuple"
tuple
}
{
"vocab"
"a vocabulary specifier"
}
{
"quot"
quotation
}
{
"path"
"a pathname string"
}
{
"assoc"
assoc
}
{
"class"
class
}
{
"timer"
timer
}
{
"url"
url
}
{
"exemplar"
object
}
{
"byte-array"
byte-array
}
{
"slice"
slice
}
{
"vocab-root"
"a vocabulary root string"
}
{
"from"
integer
}
{
"word"
word
}
{
"i"
integer
}
{
"object"
object
}
{
"duration"
duration
}
{
"hash"
hashtable
}
{
"n"
integer
}
{
"str"
string
}
{
"c-ptr"
c-ptr
}
{
"sequence"
sequence
}
{
"keys"
sequence
}
{
"hashtable"
hashtable
}
{
"to"
integer
}
{
"?"
boolean
}
}
at*
[
swap
[
\
$maybe
swap
2array
]
when
]
dip
;