zipped
This module provides alternatives to the f.lift(x, y)
syntax, (x, y).zipped(f)
, which works better with type inference.
Also enables a parameterless zipped
method, to pair an arbitrary number of parsers such that (p, q).zipped = p.zip(q)
.
Thanks to Andrei Gramescu and George Stacey for ensuring that these combinators even exist in the first place.
Attributes
- Since
-
4.5.0
- Note
-
these methods are not lazy like the
lift
syntax orliftN
functions! Use the prefix~
combinator to make arguments lazy where necessary. - Example
-
scala> import parsley.character.char scala> import parsley.syntax.zipped.{Zipped2, Zipped3} scala> case class Add(x: Int, y: Int) scala> val p = (char('a').as(4), char('b').as(5)).zipped(Add) scala> p.parse("ab") val res0 = Success(Add(4, 5)) scala> val q = (char('a').as(3), char('b').as(2), char('c').as(5)).zipped((x, y, z) => x * y + z) scala> q.parse("abc") val res1 = Success(11) scala> q.parse("ab") val res2 = Failure(..)
- Source
- zipped.scala
- Graph
-
- Supertypes
- Self type
-
zipped.type
Members list
Type members
Classlikes
This class enables the zipped
syntax on tuples of ten parsers.
This class enables the zipped
syntax on tuples of ten parsers.
Value parameters
- t
-
the ten parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of eleven parsers.
This class enables the zipped
syntax on tuples of eleven parsers.
Value parameters
- t
-
the eleven parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of twelve parsers.
This class enables the zipped
syntax on tuples of twelve parsers.
Value parameters
- t
-
the twelve parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of thirteen parsers.
This class enables the zipped
syntax on tuples of thirteen parsers.
Value parameters
- t
-
the thirteen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of fourteen parsers.
This class enables the zipped
syntax on tuples of fourteen parsers.
Value parameters
- t
-
the fourteen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of fifteen parsers.
This class enables the zipped
syntax on tuples of fifteen parsers.
Value parameters
- t
-
the fifteen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of sixteen parsers.
This class enables the zipped
syntax on tuples of sixteen parsers.
Value parameters
- t
-
the sixteen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of seventeen parsers.
This class enables the zipped
syntax on tuples of seventeen parsers.
Value parameters
- t
-
the seventeen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of eighteen parsers.
This class enables the zipped
syntax on tuples of eighteen parsers.
Value parameters
- t
-
the eighteen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of nineteen parsers.
This class enables the zipped
syntax on tuples of nineteen parsers.
Value parameters
- t
-
the nineteen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on pairs of two parsers.
This class enables the zipped
syntax on pairs of two parsers.
Value parameters
- t
-
the two parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of twenty parsers.
This class enables the zipped
syntax on tuples of twenty parsers.
Value parameters
- t
-
the twenty parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of twenty-one parsers.
This class enables the zipped
syntax on tuples of twenty-one parsers.
Value parameters
- t
-
the twenty-one parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of twenty-two parsers.
This class enables the zipped
syntax on tuples of twenty-two parsers.
Value parameters
- t
-
the twenty-two parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of three parsers.
This class enables the zipped
syntax on tuples of three parsers.
Value parameters
- t
-
the three parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of four parsers.
This class enables the zipped
syntax on tuples of four parsers.
Value parameters
- t
-
the four parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of five parsers.
This class enables the zipped
syntax on tuples of five parsers.
Value parameters
- t
-
the five parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of six parsers.
This class enables the zipped
syntax on tuples of six parsers.
Value parameters
- t
-
the six parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of seven parsers.
This class enables the zipped
syntax on tuples of seven parsers.
Value parameters
- t
-
the seven parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of eight parsers.
This class enables the zipped
syntax on tuples of eight parsers.
Value parameters
- t
-
the eight parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
This class enables the zipped
syntax on tuples of nine parsers.
This class enables the zipped
syntax on tuples of nine parsers.
Value parameters
- t
-
the nine parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
Implicits
Implicits
This class enables the zipped
syntax on tuples of ten parsers.
This class enables the zipped
syntax on tuples of ten parsers.
Value parameters
- t
-
the ten parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of eleven parsers.
This class enables the zipped
syntax on tuples of eleven parsers.
Value parameters
- t
-
the eleven parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of twelve parsers.
This class enables the zipped
syntax on tuples of twelve parsers.
Value parameters
- t
-
the twelve parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of thirteen parsers.
This class enables the zipped
syntax on tuples of thirteen parsers.
Value parameters
- t
-
the thirteen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of fourteen parsers.
This class enables the zipped
syntax on tuples of fourteen parsers.
Value parameters
- t
-
the fourteen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of fifteen parsers.
This class enables the zipped
syntax on tuples of fifteen parsers.
Value parameters
- t
-
the fifteen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of sixteen parsers.
This class enables the zipped
syntax on tuples of sixteen parsers.
Value parameters
- t
-
the sixteen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of seventeen parsers.
This class enables the zipped
syntax on tuples of seventeen parsers.
Value parameters
- t
-
the seventeen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of eighteen parsers.
This class enables the zipped
syntax on tuples of eighteen parsers.
Value parameters
- t
-
the eighteen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of nineteen parsers.
This class enables the zipped
syntax on tuples of nineteen parsers.
Value parameters
- t
-
the nineteen parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on pairs of two parsers.
This class enables the zipped
syntax on pairs of two parsers.
Value parameters
- t
-
the two parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of twenty parsers.
This class enables the zipped
syntax on tuples of twenty parsers.
Value parameters
- t
-
the twenty parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of twenty-one parsers.
This class enables the zipped
syntax on tuples of twenty-one parsers.
Value parameters
- t
-
the twenty-one parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of twenty-two parsers.
This class enables the zipped
syntax on tuples of twenty-two parsers.
Value parameters
- t
-
the twenty-two parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of three parsers.
This class enables the zipped
syntax on tuples of three parsers.
Value parameters
- t
-
the three parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of four parsers.
This class enables the zipped
syntax on tuples of four parsers.
Value parameters
- t
-
the four parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of five parsers.
This class enables the zipped
syntax on tuples of five parsers.
Value parameters
- t
-
the five parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of six parsers.
This class enables the zipped
syntax on tuples of six parsers.
Value parameters
- t
-
the six parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of seven parsers.
This class enables the zipped
syntax on tuples of seven parsers.
Value parameters
- t
-
the seven parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of eight parsers.
This class enables the zipped
syntax on tuples of eight parsers.
Value parameters
- t
-
the eight parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala
This class enables the zipped
syntax on tuples of nine parsers.
This class enables the zipped
syntax on tuples of nine parsers.
Value parameters
- t
-
the nine parsers whose results should be zipped together.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- zipped.scala