Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Cannot define '1+' #154

Closed
stibear opened this issue Jun 28, 2014 · 2 comments
Closed

Cannot define '1+' #154

stibear opened this issue Jun 28, 2014 · 2 comments

Comments

@stibear
Copy link
Contributor

stibear commented Jun 28, 2014

In picrin, we cannot define symbols which begin with numbers.
If r7rs allows such like symbols, comply with it.

@nyuichi
Copy link
Member

nyuichi commented Jun 28, 2014

@stibear

No, R7RS doesn't. Digit characters are no in the first character set of symbols. See 7.1.1 Lexical structure (P.61 r7rs.pdf)

@nyuichi
Copy link
Member

nyuichi commented Aug 7, 2014

@stibear

Use pipes:

(define (|1+| n)
  (+ n 1))

or make with different name (such as 'succ')

@nyuichi nyuichi closed this as completed Aug 7, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants