-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spelling #2381
base: master
Are you sure you want to change the base?
Spelling #2381
Changes from all commits
effa4d4
d052b9b
f2a5670
7bde543
e99f1a0
f3f78dd
da5d0b0
6ca7ca1
2fbb9f9
1d8eced
43505df
c92a6d3
d1353bc
81cfb11
ce7bf3c
7f209af
dc97fd9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ package scalaz | |
* | ||
* Day convolution is a special form of Functor multiplication. | ||
* In monoidal category of endofunctors Applicative is a monoid object when Day covolution is used as tensor. | ||
* If we use Functor composition as tensor then then monoid form a Monad instead of Applicative. | ||
* If we use Functor composition as tensor then the monoid form a Monad instead of Applicative. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not at all sure about this. |
||
* | ||
* Can be seen as generalization of method apply2 from Apply: | ||
* {{{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ package scalaz | |
* A queue that allows items to be put onto either the front (cons) | ||
* or the back (snoc) of the queue in constant time, and constant | ||
* time access to the element at the very front or the very back of | ||
* the queue. Dequeueing an element from either end is constant time | ||
* the queue. Dequeuing an element from either end is constant time | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Happy to drop this or anything else. |
||
* when amortized over a number of dequeues. | ||
* | ||
* This queue maintains an invariant that whenever there are at least | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -400,7 +400,7 @@ object Heap extends HeapInstances { | |
} | ||
|
||
def skewMeld[A](f: (A, A) => Boolean, ts: Forest[A], tsp: Forest[A]) = | ||
unionUniq(f)(uniqify(f)(ts), uniqify(f)(tsp)) | ||
unionUniq(f)(uniquify(f)(ts), uniquify(f)(tsp)) | ||
|
||
def ins[A](f: (A, A) => Boolean, t: Tree[Ranked[A]]): Forest[A] => Forest[A] = { | ||
case s if s.isEmpty => EphemeralStream(t) | ||
|
@@ -409,11 +409,14 @@ object Heap extends HeapInstances { | |
ins(f, link(f)(t, tp))(ts) | ||
} | ||
|
||
def uniqify[A](f: (A, A) => Boolean): Forest[A] => Forest[A] = { | ||
def uniquify[A](f: (A, A) => Boolean): Forest[A] => Forest[A] = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a public API. We should keep the original method for backward compatibility. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added a deprecated method with the original name that calls this method: https://github.com/scalaz/scalaz/compare/3b0bbbf7de95f0b02288c57aa839462f2deca9e3..561f47ff91cdcc603cf9ac048b831e88bf504730 Does that do what you're looking for? Are there other methods that need this treatment? |
||
case s if s.isEmpty => emptyEphemeralStream | ||
case (t ##:: ts) => ins(f, t)(ts) | ||
} | ||
|
||
@deprecated("Use uniquify", "") | ||
def uniqify[A](f: (A, A) => Boolean): Forest[A] => Forest[A] = uniquify(f) | ||
|
||
def unionUniq[A](f: (A, A) => Boolean): (Forest[A], Forest[A]) => Forest[A] = { | ||
case (s, ts) if s.isEmpty => ts | ||
case (ts, s) if s.isEmpty => ts | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -538,7 +538,7 @@ object ContravariantCoyonedaUsage { | |
s.foldMap{case (st, i) => recItem[BinOrd](i, sortTypeBinOrd(st))} | ||
|
||
// The drawback here is that I can’t just build a separate stack | ||
// willynilly for `Binfmt'. I have to prove at each step that *the | ||
// willy nilly for `Binfmt'. I have to prove at each step that *the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Google Sheets made this (and most of the other corrections). I probably wouldn't have actively made it, but it's right. |
||
// same* `I' is used for the `Binfmt' and the `Order' for this to be | ||
// useful. Once again, an idea of a fold step that can be fused | ||
// with the `Order' construction safely can be abstracted out here. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ object KleisliUsage { | |
Continent("Asia", | ||
List( | ||
Country("India", | ||
List(City("New Dehli"), City("Calcutta")))))) | ||
List(City("New Delhi"), City("Calcutta")))))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Proper name... |
||
|
||
def continents(name: String): List[Continent] = | ||
data.filter(k => k.name.contains(name)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ package scalaz.example | |
A rather contrived example which shows how ReaderWriterStateT could be used. | ||
@author stew@vireo.org / stew@helloreverb.com | ||
|
||
We create a simple langauage named CAB | ||
We create a simple language named CAB | ||
Strings in the CAB language is a series of A, B, or C tokens followed by a EOF: | ||
<cab> ::= 'C' | 'A' | 'B' | ||
<string> ::= <cab> <string> | '.' | ||
|
@@ -28,7 +28,7 @@ case object B extends Token | |
|
||
object Token { | ||
|
||
implicit val euqalsRef: Equal[Token] = Equal.equalRef | ||
implicit val equalsRef: Equal[Token] = Equal.equalRef | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? |
||
implicit val showTok: Show[Token] = { | ||
case A => Cord("A") | ||
case B => Cord("B") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ object DListTest extends SpecLite { | |
def monoid[A] = Monoid[DList[A]] | ||
def monadPlus = MonadPlus[DList] | ||
def alt = Alt[DList] | ||
def bindrec = BindRec[DList] | ||
def bindRec = BindRec[DList] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is the scariest (it occurs in three files). I can't understand how this code could compile in both forms. Based on the surrounding code, this change appears to be correct, but 🤷 . There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's just an unused method to test whether |
||
def traverse = Traverse[DList] | ||
def zip = Zip[DList] | ||
def isEmpty = IsEmpty[DList] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ object ListTest extends SpecLite { | |
a.groupWhenM[Id](p).map(_.list.toList).flatten must_===(a) | ||
} | ||
|
||
"groupByWhenM[Id] ∀(i,j) | 0<i<resut.len & 0<j<result(i).len: p(result(i)(j), p(result(i)(j+1)) yields true" ! forAll { | ||
"groupByWhenM[Id] ∀(i,j) | 0<i<result.len & 0<j<result(i).len: p(result(i)(j), p(result(i)(j+1)) yields true" ! forAll { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? |
||
(a: List[Int], p: (Int, Int) => Boolean) => | ||
a.groupWhenM[Id](p).forall { group => | ||
list.adjacentPairs(group.list.toList).forall(p.tupled) | ||
|
@@ -88,7 +88,7 @@ object ListTest extends SpecLite { | |
a.groupWhen(p).map(_.list.toList).flatten must_===(a) | ||
} | ||
|
||
"groupByWhen ∀(i,j) | 0<i<resut.len & 0<j<result(i).len: p(result(i)(j), p(result(i)(j+1)) yields true" ! forAll { | ||
"groupByWhen ∀(i,j) | 0<i<result.len & 0<j<result(i).len: p(result(i)(j), p(result(i)(j+1)) yields true" ! forAll { | ||
(a: List[Int], p: (Int, Int) => Boolean) => | ||
a.groupWhen(p).forall { group => | ||
list.adjacentPairs(group.list.toList).forall(p.tupled) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a reasonable match to the use of
Apply
on line 60