From 83f2d88502f9f801fee5a3cda4d75898d4ed595f Mon Sep 17 00:00:00 2001 From: Preetham Gujjula Date: Thu, 4 Apr 2024 20:42:25 -0700 Subject: [PATCH] Update README --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 179b936..0d9d627 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ smooth3 = applyMerge (*) (iterate (*2) 1) (iterate (*3) 1) ``` Gaussian integers, ordered by norm ([Wikipedia](https://en.wikipedia.org/wiki/Gaussian_integer)): + ```haskell zs :: [Int] zs = 0 : concatMap (\i -> [i, -i]) [1..] @@ -64,13 +65,20 @@ squarefrees = [1..] `minus` applyMerge (*) (map (^2) primes) [1..] ``` ## Naming -The name `applyMerge` comes from the idea of applying `f` to each `x` and `y`, and merging the results into one sorted output. I'm still thinking of the ideal name for this function. Other options include `sortedLiftA2`/`orderedLiftA2`, from the idea that this function is equivalent to `sort (liftA2 f xs ys)` when `xs` and `ys` are finite. If you have any ideas on the naming, let me know! + +The name `applyMerge` comes from the idea of applying `f` to each `x` and `y`, +and merging the results into one sorted output. I'm still thinking of the ideal +name for this function. Other options include `sortedLiftA2`/`orderedLiftA2`, +from the idea that this function is equivalent to `sort (liftA2 f xs ys)` when +`xs` and `ys` are finite. If you have any ideas on the naming, let me know! ## Further reading -See [ALGORITHM.md](docs/ALGORITHM.md) for a full exposition of the `applyMerge` function and its implementation. +See [ALGORITHM.md](docs/ALGORITHM.md) for a full exposition of the `applyMerge` +function and its implementation. ## Licensing + This project licensed under BSD-3-Clause (except for `.gitignore`, which is under CC0-1.0), and follows [REUSE](https://reuse.software) licensing principles.