Skip to content

Commit ffdeb1b

Browse files
committed
add List <~> IList
1 parent 5d8c8d2 commit ffdeb1b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/src/main/scala/scalaz/IList.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,13 @@ object IList extends IListInstances with IListFunctions{
494494
else go(n, empty)
495495
}
496496

497+
import Isomorphism._
498+
499+
val listIListIso: List <~> IList =
500+
new IsoFunctorTemplate[List, IList] {
501+
def to[A](fa: List[A]) = fromList(fa)
502+
def from[A](fa: IList[A]) = fa.toList
503+
}
497504
}
498505

499506
sealed trait IListFunctions

0 commit comments

Comments
 (0)