Re: Ann: func pack updates
Carlo Capelli <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CABty9wwrvgqXhmhnChFdH+ymo9bY+L6Loc+Tcosrb6FnJju9Pw@mail.gmail.com> |
2013/12/6 Michael Hendricks <[email protected]> > In v0.3.0 the func pack supports functions similar to Carlo's lifter > module. For example, > > ?- length(L, ~ is 1+2). > L = [_G185, _G188, _G191]. > > SWI-Prolog 7 dicts are now treated as functions too. This lets you use > `Dict $ key` to lookup a key's value. Unlike V7's dot notation, looking up > a missing key fails instead of throwing an exception. > > Because dicts are functions like everything else, you can compose > dictionaries together with other functions to produce still more functions. > I'm not sure how practical this feature will be, but it took no extra code > and makes me smile :-) > > Michael, that's great ! I think I will try to shape Qt.Reflection with Functional Dicts. bye Carlo > -- > Michael > -------------- next part -------------- HTML attachment scrubbed and removed