News for hackers. Stuff that matters.
Re:Ante: A low-level functional language by jfecher on Friday June 17, 2022 @09:37AM (#31777947)
map2 is indeed another name for zipWith. I believe I got that name from Racket if memory serves. Compared to zipWith I like its symmetry with the 1 argument map. I also wasn't aware of bimap! I can't seem to find a function of that name online, though I did find the BiMap haskell package, is that what you're referring to?

And yes, the dot product should be 32, thank you :)

Re:Ante: A low-level functional language by pwm on Friday June 17, 2022 @10:28AM (#31778737)
Not OP but they meant https://hackage.haskell.org/package/base-4.16.1.0/docs/Data-...

As you have the normal map function for Functors (using Haskell):

  > :t fmap
  fmap :: Functor f => (a -> b) -> f a -> f b
you can have bimap for Bifunctors:

  > :t bimap
  bimap :: Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b d
which specialised to pairs is:

  > :t bimap @(,)
  bimap @(,) :: (a -> b) -> (c -> d) -> (a, c) -> (b, d)
Re:Ante: A low-level functional language by eruditely on Friday June 17, 2022 @12:59PM (#31781077)
I was wondering why the dot product wasn't 32! Good thing I checked. Also this seems like a cool new language, I need to learn a functional language, I wonder how far this language will go in development.