Because we have too few solutions
| Library | Docs | Types | Integrations | Notes |
|---|---|---|---|---|
| built-in | official | AnyVal extended by class with a single value |
many libraries support AnyVals |
- Scala 2/3, but on 3 it has a replacement |
| # Run each recipe in a single bash shell | |
| set shell := ["bash", "-euo", "pipefail", "-c"] | |
| # Set environment variables | |
| set export | |
| BUILD_DIR := `pwd` | |
| ARCH := `uname -m` | |
| STRAWBERRY_OPT_DIR := BUILD_DIR + "/opt/strawberry_macos_" + ARCH + "_release" | |
| PKG_CONFIG_PATH := STRAWBERRY_OPT_DIR + "/lib/pkgconfig" |
Because we have too few solutions
| Library | Docs | Types | Integrations | Notes |
|---|---|---|---|---|
| built-in | official | AnyVal extended by class with a single value |
many libraries support AnyVals |
- Scala 2/3, but on 3 it has a replacement |
| #!/bin/bash | |
| defaultURL='https://github.com/ledgersmb/LedgerSMB' | |
| defaultFILE='' | |
| HELP() { | |
| cat <<-EOF | |
| usage: github-badge-cache-buster.sh [ -h | --help | [ repoURL | "auto" [ badgeFile ] ] ] | |
| repoURL defaults to '$defaultURL' |
Directly solves:
Currently Chimney attempts to derive as much as possible with a single expression. It inline results on Scala 2 it uses an approach where when implicit is summoned it is expected that only user-provided implicit would be used. This is done because:
| type ~>[F[_], G[_]] = [A] => F[A] => G[A] | |
| final case class <~>[F[_], G[_]](to: F ~> G, from: G ~> F): | |
| val mapAsTo: [A, B] => (G[A] => G[B]) => (F[A] => F[B]) = | |
| [A, B] => (f: (G[A] => G[B])) => to[A].andThen(f).andThen(from[B]) | |
| val mapAsFrom: [A, B] => (F[A] => F[B]) => (G[A] => G[B]) = | |
| [A, B] => (f: (F[A] => F[B])) => from[A].andThen(f).andThen(to[B]) | |
| extension [F[_], A](fa: F[A]) | |
| transparent inline def mapAs[G[_]]: [B] => (G[A] => G[B]) => F[B] = |
| #!/bin/bash | |
| brew bundle dump --file Brewfile | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| brew bundle install |
| trait TypedSlide[F[_], I <: Int] { | |
| type Out[A] | |
| def sliding[A](fa: F[A]): F[Out[A]] | |
| } | |
| object TypedSlide { | |
| type Arbitrary | |
| class Helper[F[_], I <: Int] { | |
| def apply[OOut[_]](f: F[Arbitrary] => F[OOut[Arbitrary]]) = new TypedSlide[F, I] { | |
| type Out[A] = OOut[A] |
| import scala.language.reflectiveCalls | |
| type Nullary[A] = Unit | |
| type Unary[A] = A | |
| type Binary[A] = (A, A) | |
| trait Algebra { | |
| type Set | |
| type Operation[F[_]] = F[Set] => Set |
Actually, more like hall of shame because I cannot watch/listen to myself without cringe, but in this time and age everyone has to be a salesman. Well, not really, but it kind of help with self-development and getting confidence, so whatever. Remember kids! You don't have to be competent to be a public speaker! (Or write a book. Or blog. Or OSS. Or get a job.)
| sealed trait FList[F[_]] extends Product with Serializable | |
| object FList { | |
| final case class Last[F[_], A, B](f: A => F[B]) extends FList[F] | |
| final case class Cons[F[_], A, B, Tail <: FList[F]](f: A => F[B], tail: Tail) extends FList[F] | |
| } | |
| implicit class FunOps[F[_], A, B](f: A => F[B]) extends AnyVal { | |
| def toFList: FList.One[F, A, B] = FList.One(f) | |