You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am going through a book by Martin McBride about functional programming in Python.
I know this is not production-class library, but I am trying to instantiate a List functor (from oslash.list) as below and I end up raising an Exception...
I looked into the code of the library and it seems that we're supposed to use the class method/factory from_iterable right now? Is this true?
While I understand this is not a repository about this book, but it also mentioned possibility of mapping functions using % operator on Functors, which seemed to be working for Just and Nothing Functors, but does not work for this List Functor. I have to use List.from_iterable([1,2,3]).map(operator.neg), the "old way" (if ever supported) neg % List.from_iterable(1,2,3) ends up raising an Exception
Hello, I am going through a book by Martin McBride about functional programming in Python.
I know this is not production-class library, but I am trying to instantiate a List functor (from oslash.list) as below and I end up raising an Exception...
Ends up with:
I looked into the code of the library and it seems that we're supposed to use the class method/factory
from_iterable
right now? Is this true?While I understand this is not a repository about this book, but it also mentioned possibility of mapping functions using
%
operator on Functors, which seemed to be working for Just and Nothing Functors, but does not work for this List Functor. I have to useList.from_iterable([1,2,3]).map(operator.neg)
, the "old way" (if ever supported)neg % List.from_iterable(1,2,3)
ends up raising an ExceptionThe text was updated successfully, but these errors were encountered: