Librería para poder definir tipos algebraicos. Vía LtU.
Algebraic Data Types in JavaScript - w3future.com
Algebraic Data Types in JavaScript - w3future.com
Introduction
Algebraic data types are types like you can declare in Haskell with data declarations. If you are not familiar with Haskell, you can try the Wikipedia page about algebraic data types.
I have written the library in Javascript 1.8, which means that as of this writing it only runs in Firefox 3.0. I have chosen to keep it 1.8, because the code is a lot cleaner, thanks to the new expression closures. But there is nothing that cannot be made to work in ECMAScript edition 3. And I have no doubt that the same thing could be done in Python or Ruby.
No hay comentarios:
Publicar un comentario