This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/1.rkt b/1.rkt | |
| index e3fcc70..b3b3636 100644 | |
| --- a/1.rkt | |
| +++ b/1.rkt | |
| @@ -1,2 +1,2 @@ | |
| #lang aoclop | |
| -read: 1 nl | v | identity | floor | ^ | |
| +read: 1 nl | v | / 3 | floor | ^ | |
| diff --git a/expander.rkt b/expander.rkt | |
| index 4101cd4..dc4a489 100644 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/1.rkt b/1.rkt | |
| index e3fcc70..b3b3636 100644 | |
| --- a/1.rkt | |
| +++ b/1.rkt | |
| @@ -1,2 +1,2 @@ | |
| #lang aoclop | |
| -read: 1 nl | v | identity | floor | ^ | |
| +read: 1 nl | v | / 3 | floor | ^ | |
| diff --git a/expander.rkt b/expander.rkt | |
| index 4101cd4..0ed364c 100644 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/aaad482 b/9ab436e | |
| index aaad482..9ab436e 100644 | |
| --- a/aaad482 | |
| +++ b/9ab436e | |
| @@ -10,6 +10,8 @@ | |
| (define-syntax (x-then-ops-in-order stx) | |
| (syntax-case stx () | |
| [(_ (lambda-x (ops ...))) (syntax-case #'(ops ...) () | |
| + [((_ "identity")) #'(identity lambda-x)] | |
| + [((_ "identity") otherop ...) #'(identity (x-then-ops-in-order(lambda-x (otherop ...))))] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/ab5d78b b/1d2ce92 | |
| index ab5d78b..1d2ce92 100644 | |
| --- a/ab5d78b | |
| +++ b/1d2ce92 | |
| @@ -9,6 +9,7 @@ | |
| ["\n" (token 'NEWLINE lexeme)] | |
| ["nl" (token 'DELIMITER lexeme)] | |
| ["floor" (token 'OP lexeme)] | |
| + ["identity" (token 'OP lexeme)] | |
| ["|" (token 'PIPE lexeme)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/a5af145 b/7fd706d | |
| index a5af145..7fd706d 100644 | |
| --- a/a5af145 | |
| +++ b/7fd706d | |
| @@ -1,2 +1,2 @@ | |
| #lang aoclop | |
| -read: 1 nl | |
| +read: 1 nl | v | identity | ^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/1.rkt b/1.rkt | |
| index 838514c..5f867d9 100644 | |
| --- a/1.rkt | |
| +++ b/1.rkt | |
| @@ -1,2 +1,2 @@ | |
| #lang aoclop | |
| -read: 1 nl | v | floor | floor | floor | floor | ^ | |
| +read: 1 nl | v | identity | floor | identity | ^ | |
| diff --git a/cat.rkt b/cat.rkt | |
| index a5af145..7fd706d 100644 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/1.rkt b/1.rkt | |
| new file mode 100644 | |
| index 0000000..838514c | |
| --- /dev/null | |
| +++ b/1.rkt | |
| @@ -0,0 +1,2 @@ | |
| +#lang aoclop | |
| +read: 1 nl | v | floor | floor | floor | floor | ^ | |
| diff --git a/expander.rkt b/expander.rkt | |
| new file mode 100644 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/scratch.rkt b/scratch.rkt | |
| index 248d5e2..e57968e 100644 | |
| --- a/scratch.rkt | |
| +++ b/scratch.rkt | |
| @@ -1,14 +1,8 @@ | |
| #lang racket | |
| (define-syntax-rule (aoclop-program read-expr (scope-block (all-ops operation ...))) | |
| - (map (λ (x) (operations (operation ... x))) read-expr)) | |
| + (map (λ (x) (x-then-ops-in-order (x (operation ...)))) read-expr)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/1.txt b/1.txt | |
| index 0c7d053..1f79766 100644 | |
| --- a/1.txt | |
| +++ b/1.txt | |
| @@ -1,4 +1,4 @@ | |
| -3 | |
| +3.7 | |
| 6 | |
| 9 | |
| 12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lexer.rkt b/lexer.rkt | |
| index 3ab0a1a..ab5d78b 100644 | |
| --- a/lexer.rkt | |
| +++ b/lexer.rkt | |
| @@ -8,8 +8,10 @@ | |
| ["read:" (token 'READ lexeme)] | |
| ["\n" (token 'NEWLINE lexeme)] | |
| ["nl" (token 'DELIMITER lexeme)] | |
| - ["/" (token 'OP lexeme)] | |
| + ["floor" (token 'OP lexeme)] |
NewerOlder