Skip to content
Browse files

Added tuples and the power operator.

  • Loading branch information...
Josiah Carlson
Josiah Carlson committed Oct 10, 2010
1 parent f900084 commit 8c534cb4138313226fb51a830a989f0688dbb7ea
Showing with 4 additions and 4 deletions.
  1. +4 −4 thirdparty/
@@ -89,10 +89,10 @@ def check(value):
types = {
'set':lambda *x: set(x), 'dict':lambda *x: dict(x),'time':dt.time,
'timedelta':dt.timedelta, 'datetime':dt.datetime, 'date',
'decimal':decimal, 'set?':tc(set), 'dict?':tc(dict), 'time?':tc(dt.time),
'decimal':decimal, 'tuple':lambda *x:tuple(x),
'set?':tc(set), 'dict?':tc(dict), 'time?':tc(dt.time),
'timedelta?':tc(dt.timedelta), 'datetime?':tc(dt.datetime),
'date?':tc(, 'decimal?':tc(decimal),

'date?':tc(, 'decimal?':tc(decimal), 'tuple?': tc(tuple),
'types': types,
@@ -131,7 +131,7 @@ def add_globals(env):
c = compose
env.update({'#t':True, '#f':False, '+':c(op.add), '-':c(op.sub),
'*':c(op.mul), '/':c(op.div), 'not':op.not_, '>', '<',
'%':op.mod, '^':c(op.xor), '<<':op.lshift, '>>':op.rshift,
'%':op.mod, '^':c(op.xor), '<<':op.lshift, '>>':op.rshift, '**':pow,
'>=', '<=':op.le, '=':op.eq, 'equal?':op.eq, 'eq?':op.is_,
'length':len, 'cons':lambda x,y:[x]+y, 'car':lambda x:x[0],
'cdr':lambda x:x[1:], 'cadr':lambda x:x[1], 'append':op.add,

0 comments on commit 8c534cb

Please sign in to comment.
You can’t perform that action at this time.