2015-07-08 02:56:11 +00:00
|
|
|
{car, cdr, listp} = require 'cons-lists/lists'
|
2015-07-28 23:51:01 +00:00
|
|
|
{Node, Symbol} = require "./reader_types"
|
2015-07-03 22:47:04 +00:00
|
|
|
|
2015-08-03 14:31:22 +00:00
|
|
|
module.exports = ops =
|
2015-07-28 23:51:01 +00:00
|
|
|
astObject: (form) -> form instanceof Node
|
|
|
|
aValue: (form) -> form.value
|
|
|
|
aSymbol: (form) -> form.value
|
|
|
|
isAList: (form) -> ops.astObject(form) and form.type == 'list'
|
|
|
|
isARecord: (form) -> ops.astObject(form) and form.type == 'record'
|
|
|
|
isAVector: (form) -> ops.astObject(form) and form.type == 'vector'
|