Mercurial > repos > other > SevenLanguagesInSevenWeeks
comparison 2-Io/day3-DSL.io @ 47:409249712590
Add final experimentation and note about DSL
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 22 Sep 2017 19:48:13 +0100 |
parents | eac30c1b92da |
children |
comparison
equal
deleted
inserted
replaced
46:eac30c1b92da | 47:409249712590 |
---|---|
67 Number atPutThing := method( | 67 Number atPutThing := method( |
68 call println | 68 call println |
69 return Range (call target) to(call evalArgAt(1)) | 69 return Range (call target) to(call evalArgAt(1)) |
70 ) | 70 ) |
71 | 71 |
72 | |
72 # But presumably this will break, because there's no "atPutThing" method | 73 # But presumably this will break, because there's no "atPutThing" method |
73 a := 1 | 74 a := 1 |
74 b := 5 | 75 b := 5 |
75 range := a : b | 76 #range := a : b |
76 # Yep - "Exception: Number does not respond to ':'" | 77 # Yep - "Exception: Number does not respond to ':'" |
77 # So you've got to be careful for reusable operators | 78 # So you've got to be careful for reusable operators |
79 | |
80 # We can't even define the method and have it Just Workâ˘. | |
81 # I know officially give up. This is undocumented and unclear. | |
82 # | |
83 #atPutThing := method(start, end, | |
84 # return Range(start) to(end) | |
85 #) | |
86 # | |
87 #range : 1 3 |