노드들 사이에 띄어쓰기 해서 입력
( car ' ( 1 2 3 ) )
- CAR
> ( car ' ( 2 3 4 ) )
... 2
- CDR
> ( cdr ' ( 2 3 4 ) )
... ' ( 3 4 )
- CONS
> ( cons ' ( 2 3 ) ' ( 4 5 6 ) )
... ' ( ( 2 3 ) 4 5 6 )
- NULL?
> ( null? ' ( ) )
... #T
> ( null? ' ( 1 2 3 ) )
... #F
- ATOM?
> ( atom? ' ( ) )
... #T
> ( atom? ' ( 1 2 ) )
... #F
- EQ?
> ( eq? ' a ' a )
... #T
> ( eq? ' ( 1 2 ) ' ( 1 2 ) )
... #F
- NOT
> ( not ( < 1 2 ) )
... #F
- DEFINE
> ( define a 1 )
> a
... 1
- lambda
> ( define plus1 ( lambda ( x ) ( + x 1 ) ) )
> ( plus1 2 )
... 3
> ( define plus2 ( lambda ( x ) (+ ( plus1 x ) 1 ) ) )
> ( plus2 3 )
... 5
> ( define cube ( lambda ( n ) ( define sqrt ( lambda ( n ) ( * n n ) ) ) ( * ( sqrt n ) n ) ) )
... ( cube 3 )
- binary
> ( + 1 2 )
... 3
> ( > 3 4 )
... #F
> ( = 1 1 )
... #T