question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Language request: Add forAll quantifier / Make MethodTypes first-class

See original GitHub issue

We already have forSome, how about adding a forAll quantifier? Haskell, for instance, has this.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:55 (53 by maintainers)

github_iconTop GitHub Comments

5reactions
milessabincommented, Jun 14, 2018

@LPTK there are tricks to do it in Scala 2 too … for Scala 3 we should be aiming to do away with the tricks and make this idiom first class.

What I’d like to see is a direct correspondence between method types (polymorphic, implicit, dependent) and function types … we’re tantalizingly close now, with this being the last piece of the picture.

I don’t particularly like the proposed syntax however. We already have universal quantification for method types, so why not simply reuse it for function types? Taking @LukaJCB’s example, that would allow us to write,

val map: [F[_], A, B](implicit Functor[F]) => F[A] => (A => B) => F[B] = ...
4reactions
oderskycommented, May 24, 2017

forSome has been deprecated 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quantifiers - Essential Java Classes
This Java tutorial describes exceptions, basic input/output, concurrency, regular expressions, and the platform environment.
Read more >
2.4: Quantifiers and Negations - Mathematics LibreTexts
Table 2.4 summarizes the facts about the two types of quantifiers. ... Every value of x in the universal set makes P(x) true....
Read more >
4. Quantifiers and Equality — Theorem Proving in Lean 3.23.0 ...
In this chapter, we extend the repertoire of logical constructions to include the universal and existential quantifiers, and the equality relation. 4.1. The ......
Read more >
Quantifiers in Regular Expressions
Learn about regular expression quantifiers, which specify how many instances of a character, group, or character class must be present in ...
Read more >
Peter Suber, "Translation Tips"
In deciding between quantifiers, ask yourself whether the English sentence commits itself to the existence of something or whether it remains non-committal. In ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found