scala - What's the new name for map2 in Scalaz 7? -


jordan west in this presentation scalamachine speaks map2 function. turns out function available in scalaz 6 can't find or equivalent in scalaz 7.

e.g. able run code:

list(some(1), some(2)).map2(_ + 1) 

and result

list(some(2), some(3)) 

where can find function in scalaz 7?

edit: ideally, able execute function f: => b on l: list[option[a]]

l.map2(f) 

and list[option[b]] intuitive semantics.

you can use applicative syntax instead:

scala> list(some(1), some(2)) <*> list((x:option[int]) => x |+| some(1)) res0: list[option[int]] = list(some(2), some(3)) 

scalaz 7 different beast compared scalaz 6.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -