Re:Show HN: Muon, a low-level programming language inspired ...
by kovrik on Monday April 08, 2019 @12:16AM
(#19602018)
In the 'Glimpse of Muon' example, how does the Map::getOrDefault() function work? Shouldn't it accept 2 args: a key and a default value (if the value associated with the given key is not found)?
[ Parent
| on HN ]
Re:Show HN: Muon, a low-level programming language inspired ...
by nickmqb on Monday April 08, 2019 @06:53AM
(#19603966)
Sibling comment (granzymes) is correct, also see implementation here: https://github.com/nickmqb/muon/blob/d557c18d2dcd3fc15a7a7a6...
In Muon, you can always add more functions to an existing namespace, so if you wanted to have a function with that behavior you could add it.