0

I noticed that the Scalaz |-> operator is not implemented in Cats. Is there a function offering similar semantics?

Dmytro Mitin
  • 48,194
  • 3
  • 28
  • 66
LuGo
  • 4,877
  • 1
  • 18
  • 19

1 Answers1

2

"Herding Cats" tutorial recommends to use spire.math.Interval as Cats/Typelevel's replacement for scalaz.Enum.

So try to replace

import scalaz.syntax.enum._
import scalaz.std.anyVal._

1 |-> 10 // List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

with

import spire.math.Interval
import spire.std.int._

Interval(1, 10).iterator(1).toList // List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
Dmytro Mitin
  • 48,194
  • 3
  • 28
  • 66