deniok: (удивлён)
deniok ([personal profile] deniok) wrote2007-10-07 02:56 pm

А знаете ли Вы что...

Зиппер для алгебраической структуры находится дифференцированием типа этой структуры.

Охренеть!

[identity profile] deni-ok.livejournal.com 2007-10-07 11:57 am (UTC)(link)
Интересно, Conor McBride сделал какую-то реализацию генераторов zipper'ов?

[identity profile] antilamer.livejournal.com 2007-10-08 09:08 am (UTC)(link)
Ну там же есть на страничке ссылка на generic zipper, правда я по ней не ходил. Может, это оно?

[identity profile] deni-ok.livejournal.com 2007-10-08 09:27 am (UTC)(link)
Это ссылка на Олега Киселёва, там, похоже, zipper'ы по-другому сделаны, на Delimited Continuations.

Цитата:
Our treatment of zipper is quite different from that of Huet (JFP,
1997) and Hinze and Jeuring (JFP 2001). Our zipper is polymorphic over
the data structure to traverse, and the zipper creation procedure is
generic and does not depend on the data structure at all. Different
data structures or different realizations of the same abstract data
structure can use the same zipper and the same zipper creation and
manipulation functions. Our zipper type depends only on the interface
(but not the implementation!) of a traversal function. Our zipper is a
derivative of a traversal function rather than that of a data
structure itself.