diff --git a/notebooks/IHaskell.ipynb b/notebooks/IHaskell.ipynb index 0e3f35aa..92cde41d 100644 --- a/notebooks/IHaskell.ipynb +++ b/notebooks/IHaskell.ipynb @@ -1957,13 +1957,24 @@ "\n", "\n", "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", + "\n", + "
\n",
+       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
+       "
\n", + "\n", "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", + "discarded:\n", + "\n", + "
\n",
+       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
+       "zip [1, 2] ['a'] = [(1, 'a')]\n",
+       "
\n", "\n", "zip is right-lazy:\n", "\n", "
\n",
        "zip [] _|_ = []\n",
+       "zip _|_ [] = _|_\n",
        "
\n", "
\n", "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", @@ -2030,28 +2041,27 @@ "zip _|_ [] = _|_\n", "\n", "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", + "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", + "discarded.\n", "\n", "zip is right-lazy:\n", "\n", "
\n",
        "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
        "
\n", "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", + "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", + "If one input list is short, excess elements of the longer list are\n", + "discarded.\n", + "\n", + "zip is right-lazy:\n", + "\n", + "
\n",
+       "zip [] _|_ = []\n",
+       "
\n", + "
\n", + "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", "\n", "
\n",
        "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
@@ -2243,13 +2253,6 @@
        "zip ∷ List l ⇒ l a → l b → l (a, b)
\n", "pair ∷ Sized f ⇒ f a → f b → f (a, b)
Default: pair a b = (,) $ a * b.\n", "
\n", - "zip ∷ (Vector v a, Vector v b, Vector v (a, b)) ⇒ v a → v b → v (a, b)
O(min(m,n)) Zip two vectors\n", - "
\n", - "pair ∷ (Vector v a, Vector v b, Vector v (a, b)) ⇒ v a → v b → v (a, b)
Pair two samples. It's like zip but requires that both samples\n", - "have equal size.\n", - "
\n", - "zip ∷ (Vector v a, Vector v b, Vector v (a, b)) ⇒ v a → v b → v (a, b)
O(min(m,n)) Zip two vectors\n", - "
\n", "zip ∷ Zip f ⇒ f a → f b → f (a, b)
\n", "zip ∷ Zip f ⇒ f a → f b → f (a, b)
\n", "zip ∷ Zip f ⇒ f a → f b → f (a, b)
\n", @@ -2273,6 +2276,13 @@ "(>*<) ∷ Monoidal f ⇒ f a → f b → f (a, b)
Merge two functors into a tuple, analogous to liftA2\n", "(,). (Sometimes known as **.)\n", "
\n", + "zip ∷ (Vector v a, Vector v b, Vector v (a, b)) ⇒ v a → v b → v (a, b)
O(min(m,n)) Zip two vectors\n", + "
\n", + "pair ∷ (Vector v a, Vector v b, Vector v (a, b)) ⇒ v a → v b → v (a, b)
Pair two samples. It's like zip but requires that both samples\n", + "have equal size.\n", + "
\n", + "zip ∷ (Vector v a, Vector v b, Vector v (a, b)) ⇒ v a → v b → v (a, b)
O(min(m,n)) Zip two vectors\n", + "
\n", "mzip ∷ MonadZip m ⇒ m a → m b → m (a, b)
\n", "projectZip ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Zipping projections.\n", "
\n", @@ -2608,13 +2618,24 @@ "zip :: () => [a] -> [b] -> [(a, b)]\n", "URL: https://hackage.haskell.org/package/llvm-hs-pure/docs/LLVM-Prelude.html#v:zip\n", "zip takes two lists and returns a list of corresponding pairs.\n", + "\n", + "
\n",
+       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
+       "
\n", + "\n", "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", + "discarded:\n", + "\n", + "
\n",
+       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
+       "zip [1, 2] ['a'] = [(1, 'a')]\n",
+       "
\n", "\n", "zip is right-lazy:\n", "\n", "
\n",
        "zip [] _|_ = []\n",
+       "zip _|_ [] = _|_\n",
        "
\n", "\n", "zip :: () => [a] -> [b] -> [(a, b)]\n", @@ -2694,30 +2715,31 @@ "
\n", "\n", "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/mixed-types-num/docs/Numeric-MixedTypes-PreludeHiding.html#v:zip\n", + "URL: https://hackage.haskell.org/package/LambdaHack/docs/Game-LambdaHack-Common-Prelude.html#v:zip\n", "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", + "discarded.\n", "\n", "zip is right-lazy:\n", "\n", "
\n",
        "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
        "
\n", "\n", "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/intro/docs/Intro.html#v:zip\n", + "URL: https://hackage.haskell.org/package/LambdaHack/docs/Game-LambdaHack-Common-Prelude.html#v:zip\n", + "zip takes two lists and returns a list of corresponding pairs.\n", + "If one input list is short, excess elements of the longer list are\n", + "discarded.\n", + "\n", + "zip is right-lazy:\n", + "\n", + "
\n",
+       "zip [] _|_ = []\n",
+       "
\n", + "\n", + "zip :: () => [a] -> [b] -> [(a, b)]\n", + "URL: https://hackage.haskell.org/package/mixed-types-num/docs/Numeric-MixedTypes-PreludeHiding.html#v:zip\n", "zip takes two lists and returns a list of corresponding pairs.\n", "\n", "
\n",
@@ -2956,19 +2978,6 @@
        "URL: https://hackage.haskell.org/package/size-based/docs/Control-Sized.html#v:pair\n",
        "Default: pair a b = (,) $ a * b.\n",
        "\n",
-       "zip :: (Vector v a, Vector v b, Vector v (a, b)) => v a -> v b -> v (a, b)\n",
-       "URL: https://hackage.haskell.org/package/vector/docs/Data-Vector-Generic.html#v:zip\n",
-       "O(min(m,n)) Zip two vectors\n",
-       "\n",
-       "pair :: (Vector v a, Vector v b, Vector v (a, b)) => v a -> v b -> v (a, b)\n",
-       "URL: https://hackage.haskell.org/package/statistics/docs/Statistics-Sample.html#v:pair\n",
-       "Pair two samples. It's like zip but requires that both samples\n",
-       "have equal size.\n",
-       "\n",
-       "zip :: (Vector v a, Vector v b, Vector v (a, b)) => v a -> v b -> v (a, b)\n",
-       "URL: https://hackage.haskell.org/package/rio/docs/RIO-Vector.html#v:zip\n",
-       "O(min(m,n)) Zip two vectors\n",
-       "\n",
        "zip :: Zip f => f a -> f b -> f (a, b)\n",
        "URL: https://hackage.haskell.org/package/classy-prelude/docs/ClassyPrelude.html#v:zip\n",
        "\n",
@@ -3004,6 +3013,19 @@
        "Merge two functors into a tuple, analogous to liftA2\n",
        "(,). (Sometimes known as **.)\n",
        "\n",
+       "zip :: (Vector v a, Vector v b, Vector v (a, b)) => v a -> v b -> v (a, b)\n",
+       "URL: https://hackage.haskell.org/package/vector/docs/Data-Vector-Generic.html#v:zip\n",
+       "O(min(m,n)) Zip two vectors\n",
+       "\n",
+       "pair :: (Vector v a, Vector v b, Vector v (a, b)) => v a -> v b -> v (a, b)\n",
+       "URL: https://hackage.haskell.org/package/statistics/docs/Statistics-Sample.html#v:pair\n",
+       "Pair two samples. It's like zip but requires that both samples\n",
+       "have equal size.\n",
+       "\n",
+       "zip :: (Vector v a, Vector v b, Vector v (a, b)) => v a -> v b -> v (a, b)\n",
+       "URL: https://hackage.haskell.org/package/rio/docs/RIO-Vector.html#v:zip\n",
+       "O(min(m,n)) Zip two vectors\n",
+       "\n",
        "mzip :: MonadZip m => m a -> m b -> m (a, b)\n",
        "URL: https://hackage.haskell.org/package/base/docs/Control-Monad-Zip.html#v:mzip\n",
        "\n",