| Type | Wish | Status | reviewed | Date | 10-Jul-2011 15:25 |
|---|---|---|---|---|---|
| Version | alpha 112 | Category | Datatype | Submitted by | GHigley |
| Platform | All | Severity | trivial | Priority | low |
| Summary | ANY-MAP! |
|---|---|
| Description |
Perhaps a built-in ANY-MAP! typeset would be useful. It would be the equivalent of SERIES! except for types that support getting a value by supplying a key to the SELECT function. Sure, it's easily created, as demonstrated below, but it strikes me as the kind of thing that should be included for the sake of completeness and consistency. |
| Example code |
any-map!: make typeset! [any-object! block! map!]
any-map?: funct [
"Return TRUE if value is any type of map."
value [any-type!]
][find any-map! type? :value]
|
| Assigned to | n/a | Fixed in | - | Last Update | 10-Jul-2011 18:08 |
|---|
| Comments | |
|---|---|
|
(0003186)
BrianH 10-Jul-2011 18:08 |
>> select "ab" #"a"
== #"b" SELECT works with all series types, not just blocks. An any-map! type defined as having SELECT work that way would include all of the container types in R3, and some port types too. There doesn't seem to be a reason for an any-map! type, though if you want to call it selectable! in your own code that would be cool. >> selectable!: exclude first types-of :select make typeset! [none!] == make typeset! [binary! string! file! email! url! tag! image! vector! block! paren! path! set-path! get-path! lit-path! map! object! port!] |
| Date | User | Field | Action | Change |
|---|---|---|---|---|
| 10-Jul-2011 18:08 | BrianH | Description | Modified | - |
| 10-Jul-2011 18:08 | BrianH | Code | Modified | - |
| 10-Jul-2011 18:08 | BrianH | Status | Modified | submitted => reviewed |
| 10-Jul-2011 18:08 | BrianH | Comment : 0003186 | Added | - |
| 10-Jul-2011 15:25 | GHigley | Ticket | Added | - |