We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents af3e4ee + 5e9b17d commit 73e3cc6Copy full SHA for 73e3cc6
lib/witchcraft/apply.ex
@@ -545,7 +545,7 @@ defclass Witchcraft.Apply do
545
[-2, -3, -1, -2, 1, 0, 3, 2]
546
547
"""
548
- @spec over(fun(), Apply.t(), Apply.t(), Apply.t()) :: Apply.t()
+ @spec over(fun(), Apply.t(), Apply.t(), Apply.t(), Apply.t()) :: Apply.t()
549
def over(fun, a, b, c, d), do: fun |> over(a, b, c) |> ap(d)
550
551
@doc """
@@ -587,7 +587,7 @@ defclass Witchcraft.Apply do
587
588
589
590
- @spec async_over(fun(), Apply.t(), Apply.t(), Apply.t()) :: Apply.t()
+ @spec async_over(fun(), Apply.t(), Apply.t(), Apply.t(), Apply.t()) :: Apply.t()
591
def async_over(fun, a, b, c, d), do: fun |> async_over(a, b, c) |> async_ap(d)
592
end
593
lib/witchcraft/arrow.ex
@@ -449,7 +449,7 @@ defclass Witchcraft.Arrow do
449
430
450
451
452
- @spec precompose(Arrow.t(), fun()) :: Arrow.t()
+ @spec postcompose(Arrow.t(), fun()) :: Arrow.t()
453
def postcompose(arrow, fun), do: arrow <~> arrowize(arrow, fun)
454
455
lib/witchcraft/chain.ex
@@ -254,7 +254,7 @@ defclass Witchcraft.Chain do
254
255
Sequences chainable actions. Note that each line must be of the same type.
256
257
- For a version with `return`, please see `Witchcraft.Monad.do/2`
+ For a version with `return`, please see `Witchcraft.Monad.monad/2`
258
259
## Examples
260
lib/witchcraft/foldable.ex
@@ -337,7 +337,7 @@ defclass Witchcraft.Foldable do
337
2
338
339
340
- @spec max(Foldable.t(), by: (any, any -> Order.ordering())) :: Ord.t()
+ @spec max(Foldable.t(), by: (any, any -> Ord.ordering())) :: Ord.t()
341
def max(foldable, by: comparator) do
342
Witchcraft.Foldable.right_fold(foldable, fn focus, acc ->
343
case comparator.(focus, acc) do
@@ -395,7 +395,7 @@ defclass Witchcraft.Foldable do
395
8
396
397
398
- @spec min(Foldable.t(), by: (any(), any() -> Order.t())) :: any() | Maybe.t()
+ @spec min(Foldable.t(), by: (any(), any() -> Ord.t())) :: any()
399
def min(foldable, by: comparitor) do
400
right_fold(foldable, fn focus, acc ->
401
case comparitor.(focus, acc) do
@@ -787,6 +787,6 @@ defclass Witchcraft.Foldable do
787
]
788
789
790
- @spec then_traverse(Apply.fun(), Foldable.t()) :: Apply.t()
+ @spec then_through(Apply.fun(), Foldable.t()) :: Apply.t()
791
def then_through(fun, traversable), do: then_traverse(traversable, fun)
792
lib/witchcraft/monad.ex
@@ -19,7 +19,7 @@ defclass Witchcraft.Monad do
19
For a nice, illustrated introduction,
20
see [Functors, Applicatives, And Monads In Pictures](http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html).
21
22
- Having `of` also lets us enhance do-notation with a convenuenct `return` function (see `monad/2`)
+ Having `of` also lets us enhance do-notation with a convenient `return` function (see `monad/2`)
23
24
## Type Class
25
@@ -36,6 +36,8 @@ defclass Witchcraft.Monad do
36
[_]
37
38
39
+ alias Witchcraft.Chain
40
+
41
extend Witchcraft.Applicative
42
extend Witchcraft.Chain
43
@@ -44,6 +46,8 @@ defclass Witchcraft.Monad do
44
46
use Witchcraft.Applicative
45
47
use Witchcraft.Chain
48
49
+ @type t :: any()
50
51
properties do
52
import Witchcraft.Applicative
53
import Witchcraft.Chain
@@ -110,7 +114,7 @@ defclass Witchcraft.Monad do
110
114
111
115
112
116
@doc "Alias for `async_chain/2`"
113
- @spec async_chain(Chain.t(), Chain.link()) :: Chain.t()
117
+ @spec async_bind(Chain.t(), Chain.link()) :: Chain.t()
118
def async_bind(chainable, link), do: async_chain(chainable, link)
119
120
0 commit comments