├── .github
├── ISSUE_TEMPLATE
│ ├── bug.md
│ └── feature_request.md
├── PULL_REQUEST_TEMPLATE.md
└── workflows
│ ├── deploy-docs.yml
│ ├── nef-compile.yml
│ └── swift.yml
├── .gitignore
├── Bow.podspec
├── Bow.xcodeproj
├── BowTests_Info.plist
├── Bow_Info.plist
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── swiftpm
│ │ └── Package.resolved
└── xcshareddata
│ └── xcschemes
│ ├── Bow-Effects-Generators.xcscheme
│ ├── Bow-Effects.xcscheme
│ ├── Bow-Free-Generators.xcscheme
│ ├── Bow-Free.xcscheme
│ ├── Bow-Generators.xcscheme
│ ├── Bow-Generic.xcscheme
│ ├── Bow-Optics.xcscheme
│ ├── Bow-OpticsLaws.xcscheme
│ ├── Bow-RecursionSchemes.xcscheme
│ ├── Bow-Rx-Generators.xcscheme
│ ├── Bow-Rx.xcscheme
│ ├── Bow.xcscheme
│ ├── BowAllTests.xcscheme
│ └── xcschememanagement.plist
├── BowEffects.podspec
├── BowEffectsGenerators.podspec
├── BowEffectsLaws.podspec
├── BowFree.podspec
├── BowFreeGenerators.podspec
├── BowGenerators.podspec
├── BowGeneric.podspec
├── BowLaws.podspec
├── BowOptics.podspec
├── BowOpticsLaws.podspec
├── BowRecursionSchemes.podspec
├── BowRx.podspec
├── BowRxGenerators.podspec
├── CHANGELOG
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Cartfile
├── Cartfile.private
├── Documentation.app
├── Contents
│ ├── Info.plist
│ ├── MacOS
│ │ ├── Composition.playground
│ │ │ ├── Pages
│ │ │ │ ├── Combining independent computations.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Combining values of the same type.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Composing functions.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Composition Overview.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Lifting values to an effect.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Sequencing dependent computations.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Transforming data.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ └── Transforming multiple effects.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ ├── contents.xcplayground
│ │ │ └── playground.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ ├── Dependency management.playground
│ │ │ ├── Pages
│ │ │ │ ├── Constructor-based dependency injection.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Dependency management Overview.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Partial application.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Reader.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ └── Side-effectful dependency management.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ ├── contents.xcplayground
│ │ │ └── playground.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ ├── Documentation.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── xcschemes
│ │ │ │ └── Documentation.xcscheme
│ │ ├── Documentation.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── Documentation
│ │ │ └── Info.plist
│ │ ├── Effects.playground
│ │ │ ├── Pages
│ │ │ │ ├── Concurrency.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Effects Overview.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Foundation extensions.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Handling errors.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Handling resources.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Manipulating side effects.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Retrying and repeating effects.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Running side effects.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ └── Suspending side effects.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ ├── contents.xcplayground
│ │ │ └── playground.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ ├── FP concepts.playground
│ │ │ ├── Pages
│ │ │ │ ├── Data types.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Functions vs Procedures.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Glossary.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Higher Kinded Types.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Rank-N polymorphism.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ └── Type classes.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ ├── contents.xcplayground
│ │ │ ├── docs
│ │ │ │ └── docs
│ │ │ │ │ ├── README.md
│ │ │ │ │ └── legal
│ │ │ │ │ ├── credits
│ │ │ │ │ └── README.md
│ │ │ │ │ └── license
│ │ │ │ │ └── README.md
│ │ │ └── playground.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ ├── Integrations.playground
│ │ │ ├── Pages
│ │ │ │ └── RxSwift streams.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ ├── contents.xcplayground
│ │ │ └── playground.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ ├── LICENSE
│ │ ├── Legal.playground
│ │ │ ├── Pages
│ │ │ │ ├── Credits.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ └── License.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ ├── contents.xcplayground
│ │ │ └── playground.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ ├── Optics.playground
│ │ │ ├── Pages
│ │ │ │ ├── Automatic derivation.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Composition.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Optics Overview.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ └── Writing your own optics.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ ├── contents.xcplayground
│ │ │ └── playground.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ ├── Patterns.playground
│ │ │ ├── Pages
│ │ │ │ ├── Error handling.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Monad comprehensions.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Polymorphic programs.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── State-based computations.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ └── Tail recursion.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ ├── contents.xcplayground
│ │ │ └── playground.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ ├── Podfile
│ │ ├── Podfile.lock
│ │ ├── Quick start.playground
│ │ │ ├── Pages
│ │ │ │ ├── Getting started.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Modules.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ └── Resources.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ ├── contents.xcplayground
│ │ │ ├── docs
│ │ │ │ └── docs
│ │ │ │ │ └── quick-start
│ │ │ │ │ ├── getting-started
│ │ │ │ │ └── README.md
│ │ │ │ │ ├── modules
│ │ │ │ │ └── README.md
│ │ │ │ │ └── resources
│ │ │ │ │ └── README.md
│ │ │ └── playground.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ ├── Testing.playground
│ │ │ ├── Pages
│ │ │ │ ├── Testing Overview.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ ├── Testing side effectful code.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ │ └── Testing type class instances.xcplaygroundpage
│ │ │ │ │ └── Contents.swift
│ │ │ ├── contents.xcplayground
│ │ │ └── playground.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ └── launcher
│ └── Resources
│ │ ├── AppIcon.icns
│ │ └── Assets.car
└── Jekyll
│ └── Home.md
├── Gemfile
├── Gemfile.lock
├── LICENSE
├── Package.resolved
├── Package.swift
├── README.md
├── Sources
├── Bow
│ ├── Arrow
│ │ ├── Cokleisli.swift
│ │ ├── CokleisliK.swift
│ │ ├── Function0.swift
│ │ ├── Function1.swift
│ │ ├── FunctionK+Coyoneda.swift
│ │ ├── FunctionK.swift
│ │ ├── Kleisli.swift
│ │ └── LazyFunction1.swift
│ ├── Data
│ │ ├── Action.swift
│ │ ├── Array.swift
│ │ ├── ArrayK.swift
│ │ ├── Co.swift
│ │ ├── CoSum.swift
│ │ ├── Const.swift
│ │ ├── Coreader.swift
│ │ ├── Coyoneda.swift
│ │ ├── Day.swift
│ │ ├── Dictionary.swift
│ │ ├── DictionaryK.swift
│ │ ├── Either.swift
│ │ ├── EitherK.swift
│ │ ├── Endo.swift
│ │ ├── Eval.swift
│ │ ├── Exists.swift
│ │ ├── Id.swift
│ │ ├── Ior.swift
│ │ ├── Moore.swift
│ │ ├── NonEmptyArray.swift
│ │ ├── Option.swift
│ │ ├── PairK.swift
│ │ ├── Pairing.swift
│ │ ├── Puller.swift
│ │ ├── Reader.swift
│ │ ├── Result.swift
│ │ ├── Set.swift
│ │ ├── SetK.swift
│ │ ├── Sum.swift
│ │ ├── Trampoline.swift
│ │ ├── Tree.swift
│ │ ├── Try.swift
│ │ ├── Validated.swift
│ │ ├── Yoneda.swift
│ │ └── Zipper.swift
│ ├── Instances
│ │ ├── BoolInstances.swift
│ │ ├── NumberInstances.swift
│ │ ├── OptionInstances.swift
│ │ └── StringInstances.swift
│ ├── Syntax
│ │ ├── BooleanFunctions.swift
│ │ ├── Curry.swift
│ │ ├── HigherKinds.swift
│ │ ├── Memoization.swift
│ │ ├── PartialApplication.swift
│ │ ├── Predef.swift
│ │ └── Reverse.swift
│ ├── Transformers
│ │ ├── EitherT.swift
│ │ ├── EnvT.swift
│ │ ├── OptionT.swift
│ │ ├── StateT.swift
│ │ ├── StoreT.swift
│ │ ├── TracedT.swift
│ │ └── WriterT.swift
│ └── Typeclasses
│ │ ├── Alternative.swift
│ │ ├── Applicative.swift
│ │ ├── ApplicativeError.swift
│ │ ├── Bimonad.swift
│ │ ├── Comonad.swift
│ │ ├── ComonadEnv.swift
│ │ ├── ComonadStore.swift
│ │ ├── ComonadTraced.swift
│ │ ├── ComonadTrans.swift
│ │ ├── Comparable.swift
│ │ ├── Contravariant.swift
│ │ ├── Decidable.swift
│ │ ├── Divide.swift
│ │ ├── Divisible.swift
│ │ ├── EquatableK.swift
│ │ ├── Foldable.swift
│ │ ├── Functor.swift
│ │ ├── FunctorFilter.swift
│ │ ├── HashableK.swift
│ │ ├── Invariant.swift
│ │ ├── Monad.swift
│ │ ├── MonadCombine.swift
│ │ ├── MonadComprehensions
│ │ ├── BindingExpression.swift
│ │ ├── BindingOperator.swift
│ │ ├── BoundVar.swift
│ │ ├── MonadComprenhensions.swift
│ │ ├── ReaderBindingExpression.swift
│ │ ├── StateBindingExpression.swift
│ │ └── WriterBindingExpression.swift
│ │ ├── MonadError.swift
│ │ ├── MonadFilter.swift
│ │ ├── MonadReader.swift
│ │ ├── MonadState.swift
│ │ ├── MonadTrans.swift
│ │ ├── MonadWriter.swift
│ │ ├── Monoid.swift
│ │ ├── MonoidK.swift
│ │ ├── Monoidal.swift
│ │ ├── NonEmptyReducible.swift
│ │ ├── Reducible.swift
│ │ ├── Selective.swift
│ │ ├── Semigroup.swift
│ │ ├── SemigroupK.swift
│ │ ├── Semigroupal.swift
│ │ ├── Semiring.swift
│ │ ├── Traverse.swift
│ │ └── TraverseFilter.swift
├── BowEffects
│ ├── Data
│ │ ├── Array+TraverseConcurrent.swift
│ │ ├── Atomic.swift
│ │ ├── EnvIO.swift
│ │ ├── IO.swift
│ │ ├── Internal
│ │ │ ├── Dictionary+Extensions.swift
│ │ │ ├── DispatchTimeInterval+Extensions.swift
│ │ │ └── Queue.swift
│ │ ├── Ref.swift
│ │ ├── Resource.swift
│ │ └── Schedule.swift
│ ├── Foundation
│ │ ├── ConsoleIO.swift
│ │ ├── FileManager+Common.swift
│ │ ├── FileManager+iOS+Mac.swift
│ │ └── URLSession.swift
│ └── Typeclasses
│ │ ├── Async.swift
│ │ ├── Bracket.swift
│ │ ├── Concurrent.swift
│ │ ├── ConcurrentEffect.swift
│ │ ├── ConcurrentTraverse.swift
│ │ ├── Effect.swift
│ │ ├── EffectComprehensions.swift
│ │ ├── MonadDefer.swift
│ │ └── UnsafeRun.swift
├── BowFree
│ ├── Cofree.swift
│ ├── Free.swift
│ ├── FunctionK+Free.swift
│ └── Program.swift
├── BowGeneric
│ ├── Coproduct10.swift
│ ├── Coproduct2.swift
│ ├── Coproduct3.swift
│ ├── Coproduct4.swift
│ ├── Coproduct5.swift
│ ├── Coproduct6.swift
│ ├── Coproduct7.swift
│ ├── Coproduct8.swift
│ ├── Coproduct9.swift
│ ├── Generic.swift
│ ├── HList.swift
│ └── Product.swift
├── BowOptics
│ ├── AffineTraversal.swift
│ ├── Auto
│ │ ├── AutoAffineTraversal.swift
│ │ ├── AutoFold.swift
│ │ ├── AutoGetter.swift
│ │ ├── AutoLens.swift
│ │ ├── AutoOptics.swift
│ │ ├── AutoPrism.swift
│ │ ├── AutoSetter.swift
│ │ └── AutoTraversal.swift
│ ├── BoundSetter.swift
│ ├── DSL
│ │ ├── At+Optics.swift
│ │ ├── Each+Optics.swift
│ │ ├── Index+Optics.swift
│ │ └── Kind+Optics.swift
│ ├── Extensions
│ │ └── StateT+Optics.swift
│ ├── Fold.swift
│ ├── Getter.swift
│ ├── Instances
│ │ ├── ArrayKOpticsInstances.swift
│ │ ├── ArrayOpticsInstances.swift
│ │ ├── ConstOpticsInstances.swift
│ │ ├── EitherKOpticsInstances.swift
│ │ ├── EitherOpticsInstances.swift
│ │ ├── IdOpticsInstances.swift
│ │ ├── IorOpticsInstances.swift
│ │ ├── NonEmptyArrayOpticsInstances.swift
│ │ ├── OptionOpticsInstances.swift
│ │ ├── StringOpticsInstances.swift
│ │ ├── TryOpticsInstances.swift
│ │ └── ValidatedOpticsInstances.swift
│ ├── Iso.swift
│ ├── Lens.swift
│ ├── Prism.swift
│ ├── STD
│ │ ├── ArrayK+Optics.swift
│ │ ├── Either+Optics.swift
│ │ ├── Id+Optics.swift
│ │ ├── Ior+Optics.swift
│ │ ├── NonEmptyArray+Optics.swift
│ │ ├── Option+Optics.swift
│ │ ├── Result+Optics.swift
│ │ ├── String+Optics.swift
│ │ ├── Try+Optics.swift
│ │ └── Validated+Optics.swift
│ ├── Setter.swift
│ ├── Traversal.swift
│ ├── Tuple
│ │ ├── Tuple10.swift
│ │ ├── Tuple2.swift
│ │ ├── Tuple3.swift
│ │ ├── Tuple4.swift
│ │ ├── Tuple5.swift
│ │ ├── Tuple6.swift
│ │ ├── Tuple7.swift
│ │ ├── Tuple8.swift
│ │ └── Tuple9.swift
│ └── Typeclasses
│ │ ├── At.swift
│ │ ├── Cons.swift
│ │ ├── Each.swift
│ │ ├── FilterIndex.swift
│ │ ├── Index.swift
│ │ └── Snoc.swift
├── BowRecursionSchemes
│ ├── Data
│ │ ├── Fix.swift
│ │ ├── Mu.swift
│ │ └── Nu.swift
│ ├── Recursion.swift
│ └── Typeclasses
│ │ ├── Birecursive.swift
│ │ ├── Corecursive.swift
│ │ └── Recursive.swift
└── BowRx
│ ├── MaybeK.swift
│ ├── ObservableK.swift
│ └── SingleK.swift
├── Support Files
├── Bow-AllTests-Info.plist
├── Bow-Effects-Generators-Info.plist
├── Bow-Effects-Info.plist
├── Bow-EffectsLaws-Info.plist
├── Bow-EffectsTests-Info.plist
├── Bow-Free-Generators-Info.plist
├── Bow-Free-Info.plist
├── Bow-FreeTests-Info.plist
├── Bow-Generators-Info.plist
├── Bow-Generic-Info.plist
├── Bow-GenericTests-Info.plist
├── Bow-Info.plist
├── Bow-Laws-Info.plist
├── Bow-Optics-Info.plist
├── Bow-OpticsLaws-Info.plist
├── Bow-OpticsTests-Info.plist
├── Bow-RecursionSchemes-Info.plist
├── Bow-RecursionSchemesTests-Info.plist
├── Bow-Rx-Info.plist
├── Bow-RxGenerators-Info.plist
├── Bow-RxTests-Info.plist
└── Bow-Test-Info.plist
├── Tests
├── BowAllTests
│ └── BowTests.xctestplan
├── BowEffectsGenerators
│ └── IO+Gen.swift
├── BowEffectsLaws
│ ├── AsyncLaws.swift
│ ├── BracketLaws.swift
│ └── MonadDeferLaws.swift
├── BowEffectsTests
│ ├── EnvIOTest.swift
│ └── IOTest.swift
├── BowFreeGenerators
│ ├── Cofree+Gen.swift
│ ├── Free+Gen.swift
│ └── Program+Gen.swift
├── BowFreeTests
│ ├── CofreeTest.swift
│ ├── FreeTest.swift
│ └── ProgramTest.swift
├── BowGenerators
│ ├── Arrow
│ │ ├── Function0+Gen.swift
│ │ ├── Function1+Gen.swift
│ │ ├── Kleisli+Gen.swift
│ │ └── LazyFunction1+Gen.swift
│ ├── Data
│ │ ├── ArrayK+Gen.swift
│ │ ├── Co+Gen.swift
│ │ ├── Const+Gen.swift
│ │ ├── CoyonedaGen.swift
│ │ ├── Day+Gen.swift
│ │ ├── DictionaryK+Gen.swift
│ │ ├── Either+Gen.swift
│ │ ├── EitherK+Gen.swift
│ │ ├── Endo+Gen.swift
│ │ ├── Eval+Gen.swift
│ │ ├── Exists+Gen.swift
│ │ ├── Id+Gen.swift
│ │ ├── Ior+Gen.swift
│ │ ├── Moore+Gen.swift
│ │ ├── NonEmptyArray+Gen.swift
│ │ ├── Option+Gen.swift
│ │ ├── PairK+Gen.swift
│ │ ├── Sum+Gen.swift
│ │ ├── Trampoline+Gen.swift
│ │ ├── Tree+Gen.swift
│ │ ├── Try+Gen.swift
│ │ ├── Validated+Gen.swift
│ │ ├── Yoneda+Gen.swift
│ │ └── Zipper+Gen.swift
│ ├── Transformers
│ │ ├── EitherT+Gen.swift
│ │ ├── EnvT+Gen.swift
│ │ ├── OptionT+Gen.swift
│ │ ├── StateT+Gen.swift
│ │ ├── StoreT+Gen.swift
│ │ ├── TracedT+Gen.swift
│ │ └── WriterT+Gen.swift
│ └── Typeclasses
│ │ └── ArbitraryK.swift
├── BowGenericTests
│ └── GenericTest.swift
├── BowLaws
│ ├── AlternativeLaws.swift
│ ├── ApplicativeErrorLaws.swift
│ ├── ApplicativeLaws.swift
│ ├── BimonadLaws.swift
│ ├── BindingOperatorOverload.swift
│ ├── ComonadEnvLaws.swift
│ ├── ComonadLaws.swift
│ ├── ComonadStoreLaws.swift
│ ├── ComonadTracedLaws.swift
│ ├── ComonadTransLaws.swift
│ ├── ComparableLaws.swift
│ ├── ContravariantLaws.swift
│ ├── CustomStringConvertibleLaws.swift
│ ├── DivideLaws.swift
│ ├── DivisibleLaws.swift
│ ├── EqualityFunctions.swift
│ ├── EquatableKLaws.swift
│ ├── EquatableLaws.swift
│ ├── FoldableLaws.swift
│ ├── FunctorFilterLaws.swift
│ ├── FunctorLaws.swift
│ ├── HashableKLaws.swift
│ ├── InvariantLaws.swift
│ ├── MonadCombineLaws.swift
│ ├── MonadErrorLaws.swift
│ ├── MonadFilterLaws.swift
│ ├── MonadLaws.swift
│ ├── MonadStateLaws.swift
│ ├── MonadTransLaws.swift
│ ├── MonadWriterLaws.swift
│ ├── MonoidKLaws.swift
│ ├── MonoidLaws.swift
│ ├── MonoidalLaws.swift
│ ├── PropertyOperatorOverload.swift
│ ├── SelectiveLaws.swift
│ ├── SemigroupKLaws.swift
│ ├── SemigroupLaws.swift
│ ├── SemigroupalLaws.swift
│ ├── SemiringLaws.swift
│ ├── TraverseFilterLaws.swift
│ └── TraverseLaws.swift
├── BowOpticsLaws
│ ├── AffineTraversalLaws.swift
│ ├── IsoLaws.swift
│ ├── LensLaws.swift
│ ├── PrismLaws.swift
│ ├── SetterLaws.swift
│ └── TraversalLaws.swift
├── BowOpticsTests
│ ├── AffineTraversalTest.swift
│ ├── FoldTest.swift
│ ├── GetterTest.swift
│ ├── IsoTest.swift
│ ├── LensTest.swift
│ ├── PrismTest.swift
│ ├── SetterTest.swift
│ ├── TestDomain.swift
│ └── TraversalTest.swift
├── BowRecursionSchemesTests
│ └── RecursionTest.swift
├── BowRxGenerators
│ ├── MaybeK+Gen.swift
│ ├── ObservableK+Gen.swift
│ └── SingleK+Gen.swift
├── BowRxTests
│ ├── MaybeKTest.swift
│ ├── ObservableKTest.swift
│ └── SingleKTest.swift
└── BowTests
│ ├── Arrow
│ ├── Function0Test.swift
│ ├── Function1Test.swift
│ ├── KleisliTest.swift
│ └── LazyFunction1Test.swift
│ ├── Data
│ ├── ArrayKTest.swift
│ ├── ArrayTest.swift
│ ├── CoTest.swift
│ ├── ConstTest.swift
│ ├── CoyonedaNaturalTransformationTests.swift
│ ├── CoyonedaTest.swift
│ ├── DayTest.swift
│ ├── DictionaryKTest.swift
│ ├── DictionaryTest.swift
│ ├── EitherKTest.swift
│ ├── EitherTest.swift
│ ├── EndoTest.swift
│ ├── EvalTest.swift
│ ├── ExistsTests.swift
│ ├── IdTest.swift
│ ├── IorTest.swift
│ ├── MooreTest.swift
│ ├── NonEmptyArrayTest.swift
│ ├── OptionTest.swift
│ ├── PairKTest.swift
│ ├── PairingTest.swift
│ ├── ResultTest.swift
│ ├── SetKTest.swift
│ ├── SetTest.swift
│ ├── SumTest.swift
│ ├── TrampolineTest.swift
│ ├── TreeTest.swift
│ ├── TryTest.swift
│ ├── ValidatedTest.swift
│ ├── YonedaTest.swift
│ └── ZipperTest.swift
│ ├── Instances
│ ├── BoolInstancesTest.swift
│ ├── NumberInstancesTest.swift
│ └── StringInstancesTest.swift
│ ├── Syntax
│ ├── BooleanFunctionsTest.swift
│ ├── CurryTest.swift
│ ├── MemoizationTest.swift
│ ├── MonadComprehensionTest.swift
│ ├── PartialApplicationTest.swift
│ ├── PredefTest.swift
│ └── ReverseTest.swift
│ └── Transformers
│ ├── EitherTTest.swift
│ ├── EnvTTest.swift
│ ├── OptionTTest.swift
│ ├── StateTTest.swift
│ ├── StoreTTest.swift
│ ├── TracedTTest.swift
│ └── WriterTTest.swift
├── docs
├── .gitignore
├── CNAME
├── Gemfile
├── Gemfile.lock
├── _config.yml
├── _data
│ ├── features.yml
│ └── menu.yml
├── _includes
│ ├── _doc-wrapper.html
│ ├── _footer.html
│ ├── _google-tag-manager.html
│ ├── _head-docs.html
│ ├── _head.html
│ ├── _header.html
│ ├── _js-bottom-docs.html
│ ├── _main.html
│ ├── _nav.html
│ ├── _navigation-api-versions.html
│ ├── _navigation-doc-versions.html
│ ├── _sidebar-doc-versions.html
│ └── _sidebar-wrapper.html
├── _layouts
│ ├── docs.html
│ └── home.html
├── _sass
│ ├── base
│ │ ├── _base.scss
│ │ └── _reset.scss
│ ├── components
│ │ ├── _badges.scss
│ │ ├── _buttons.scss
│ │ ├── _code.scss
│ │ ├── _doc-body.scss
│ │ ├── _doc-content.scss
│ │ ├── _doc-header.scss
│ │ ├── _doc-versions.scss
│ │ ├── _features.scss
│ │ ├── _footer.scss
│ │ ├── _masthead.scss
│ │ ├── _navigation.scss
│ │ ├── _sidebar-nav.scss
│ │ ├── _sidebar.scss
│ │ ├── _table.scss
│ │ └── _wrapper.scss
│ ├── utils
│ │ ├── _mixins.scss
│ │ ├── _variables.scss
│ │ └── mixins
│ │ │ ├── _breakpoint.scss
│ │ │ ├── _flexbox.scss
│ │ │ └── _helpers.scss
│ └── vendors
│ │ └── animate
│ │ ├── _attention-seekers
│ │ ├── _bounce.scss
│ │ ├── _flash.scss
│ │ ├── _jello.scss
│ │ ├── _pulse.scss
│ │ ├── _rubberBand.scss
│ │ ├── _shake.scss
│ │ ├── _swing.scss
│ │ ├── _tada.scss
│ │ ├── _wobble.scss
│ │ └── attention-seekers.scss
│ │ ├── _bouncing-entrances
│ │ ├── _bounceIn.scss
│ │ ├── _bounceInDown.scss
│ │ ├── _bounceInLeft.scss
│ │ ├── _bounceInRight.scss
│ │ ├── _bounceInUp.scss
│ │ └── bouncing-entrances.scss
│ │ ├── _bouncing-exits
│ │ ├── _bounceOut.scss
│ │ ├── _bounceOutDown.scss
│ │ ├── _bounceOutLeft.scss
│ │ ├── _bounceOutRight.scss
│ │ ├── _bounceOutUp.scss
│ │ └── bouncing-exits.scss
│ │ ├── _fading-entrances
│ │ ├── _fadeIn.scss
│ │ ├── _fadeInDown.scss
│ │ ├── _fadeInDownBig.scss
│ │ ├── _fadeInLeft.scss
│ │ ├── _fadeInLeftBig.scss
│ │ ├── _fadeInRight.scss
│ │ ├── _fadeInRightBig.scss
│ │ ├── _fadeInUp.scss
│ │ ├── _fadeInUpBig.scss
│ │ └── fading-entrances.scss
│ │ ├── _fading-exits
│ │ ├── _fadeOut.scss
│ │ ├── _fadeOutDown.scss
│ │ ├── _fadeOutDownBig.scss
│ │ ├── _fadeOutLeft.scss
│ │ ├── _fadeOutLeftBig.scss
│ │ ├── _fadeOutRight.scss
│ │ ├── _fadeOutRightBig.scss
│ │ ├── _fadeOutUp.scss
│ │ ├── _fadeOutUpBig.scss
│ │ └── fading-exits.scss
│ │ ├── _flippers
│ │ ├── _flip.scss
│ │ ├── _flipInX.scss
│ │ ├── _flipInY.scss
│ │ ├── _flipOutX.scss
│ │ ├── _flipOutY.scss
│ │ └── flippers.scss
│ │ ├── _lightspeed
│ │ ├── _lightSpeedIn.scss
│ │ ├── _lightSpeedOut.scss
│ │ └── lightspeed.scss
│ │ ├── _properties.scss
│ │ ├── _rotating-entrances
│ │ ├── _rotateIn.scss
│ │ ├── _rotateInDownLeft.scss
│ │ ├── _rotateInDownRight.scss
│ │ ├── _rotateInUpLeft.scss
│ │ ├── _rotateInUpRight.scss
│ │ └── rotating-entrances.scss
│ │ ├── _rotating-exits
│ │ ├── _rotateOut.scss
│ │ ├── _rotateOutDownLeft.scss
│ │ ├── _rotateOutDownRight.scss
│ │ ├── _rotateOutUpLeft.scss
│ │ ├── _rotateOutUpRight.scss
│ │ └── rotating-exits.scss
│ │ ├── _sliding-entrances
│ │ ├── _slideInDown.scss
│ │ ├── _slideInLeft.scss
│ │ ├── _slideInRight.scss
│ │ ├── _slideInUp.scss
│ │ └── sliding-entrances.scss
│ │ ├── _sliding-exits
│ │ ├── _slideOutDown.scss
│ │ ├── _slideOutLeft.scss
│ │ ├── _slideOutRight.scss
│ │ ├── _slideOutUp.scss
│ │ └── sliding-exits.scss
│ │ ├── _specials
│ │ ├── _hinge.scss
│ │ ├── _rollIn.scss
│ │ ├── _rollOut.scss
│ │ └── specials.scss
│ │ ├── _zooming-entrances
│ │ ├── _zoomIn.scss
│ │ ├── _zoomInDown.scss
│ │ ├── _zoomInLeft.scss
│ │ ├── _zoomInRight.scss
│ │ ├── _zoomInUp.scss
│ │ └── zooming-entrances.scss
│ │ ├── _zooming-exits
│ │ ├── _zoomOut.scss
│ │ ├── _zoomOutDown.scss
│ │ ├── _zoomOutLeft.scss
│ │ ├── _zoomOutRight.scss
│ │ ├── _zoomOutUp.scss
│ │ └── zooming-exits.scss
│ │ └── animate.scss
├── css
│ ├── docs.scss
│ └── styles.scss
├── extra
│ ├── apple-jazzy-theme
│ │ ├── assets
│ │ │ ├── css
│ │ │ │ ├── highlight.css.scss
│ │ │ │ └── jazzy.css.scss
│ │ │ ├── img
│ │ │ │ ├── carat.png
│ │ │ │ ├── dash.png
│ │ │ │ └── gh.png
│ │ │ └── js
│ │ │ │ ├── jazzy.js
│ │ │ │ └── jquery.min.js
│ │ └── templates
│ │ │ ├── doc.mustache
│ │ │ ├── footer.mustache
│ │ │ ├── header.mustache
│ │ │ ├── nav.mustache
│ │ │ ├── parameter.mustache
│ │ │ ├── task.mustache
│ │ │ └── tasks.mustache
│ ├── bow-jazzy-theme
│ │ ├── LICENSE
│ │ ├── assets
│ │ │ ├── css
│ │ │ │ ├── highlight.css
│ │ │ │ └── jazzy.css.scss
│ │ │ ├── fonts
│ │ │ │ ├── opensans-bold.eot
│ │ │ │ ├── opensans-bold.woff
│ │ │ │ ├── opensans-regular.eot
│ │ │ │ └── opensans-regular.woff
│ │ │ ├── img
│ │ │ │ ├── bow-logo.png
│ │ │ │ ├── carat.png
│ │ │ │ ├── dash.png
│ │ │ │ ├── github.svg
│ │ │ │ ├── link.svg
│ │ │ │ ├── mapbox.svg
│ │ │ │ ├── minus.svg
│ │ │ │ └── plus.svg
│ │ │ └── js
│ │ │ │ ├── jazzy.js
│ │ │ │ ├── jazzy.search.js
│ │ │ │ ├── jquery.min.js
│ │ │ │ ├── lunr.min.js
│ │ │ │ └── typeahead.jquery.js
│ │ └── templates
│ │ │ ├── deprecation.mustache
│ │ │ ├── doc.mustache
│ │ │ ├── footer.mustache
│ │ │ ├── header.mustache
│ │ │ ├── nav.mustache
│ │ │ ├── parameter.mustache
│ │ │ ├── task.mustache
│ │ │ └── tasks.mustache
│ └── mapbox-jazzy-theme
│ │ ├── LICENSE
│ │ ├── assets
│ │ ├── css
│ │ │ ├── highlight.css.scss
│ │ │ └── jazzy.css.scss
│ │ ├── fonts
│ │ │ ├── opensans-bold.eot
│ │ │ ├── opensans-bold.woff
│ │ │ ├── opensans-regular.eot
│ │ │ └── opensans-regular.woff
│ │ ├── img
│ │ │ ├── carat.png
│ │ │ ├── dash.png
│ │ │ ├── github.svg
│ │ │ ├── link.svg
│ │ │ ├── mapbox.svg
│ │ │ ├── minus.svg
│ │ │ └── plus.svg
│ │ └── js
│ │ │ ├── jazzy.js
│ │ │ ├── jazzy.search.js
│ │ │ ├── jquery.min.js
│ │ │ ├── lunr.min.js
│ │ │ └── typeahead.jquery.js
│ │ └── templates
│ │ ├── deprecation.mustache
│ │ ├── doc.mustache
│ │ ├── footer.mustache
│ │ ├── header.mustache
│ │ ├── nav.mustache
│ │ ├── parameter.mustache
│ │ ├── task.mustache
│ │ └── tasks.mustache
├── img
│ ├── bow-brand-color.png
│ ├── bow-logo.png
│ ├── bow-logo.svg
│ ├── bow-logo_no-text.png
│ ├── favicon.png
│ ├── feature-icon-primary.svg
│ ├── feature-icon-quarter.svg
│ ├── feature-icon-secondary.svg
│ ├── feature-icon-tertiary.svg
│ ├── icon.svg
│ ├── logo_masthead.svg
│ └── twitter-card.png
├── index.md
└── js
│ ├── doc-versions.js
│ ├── docs.js
│ └── functions.js
├── fastlane
├── Appfile
├── Fastfile
└── README.md
├── favicon.png
└── scripts
└── gen-docs.rb
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Request new functionality in Bow
4 | title: [Request]
5 | labels: ''
6 | assignees: Maintainers
7 |
8 | ---
9 |
10 | ## Description
11 |
12 | *Describe your proposal for new functionality.*
13 |
14 | ## Sample usage
15 |
16 | *Provide sample code of how the new functionality should work.*
17 |
18 | ## Potential implementation
19 |
20 | *Provide an outline of how this functionality could be implemented.*
21 |
22 | ## Modules
23 |
24 | *List the modules that may be affected by this new functionality. Describe if any new modules will need to be created.*
25 |
26 | ## Breaking changes
27 |
28 | *Describe possible breaking changes that may happen if this functionality is included.*
29 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Related issues
2 |
3 | *Reference issues that you are addressing with this pull request.*
4 |
5 | ## Goal
6 |
7 | *Describe the objective of these changes.*
8 |
9 | ## Implementation details
10 |
11 | *Describe any remarkable decisions that you made in the implementation of these changes.*
12 |
13 | ## Testing details
14 |
15 | *Describe any remarkable decisions that you made in the tests of these changes.
16 |
--------------------------------------------------------------------------------
/.github/workflows/deploy-docs.yml:
--------------------------------------------------------------------------------
1 | name: Deploy docs
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 |
8 | jobs:
9 | build:
10 | runs-on: macos-latest
11 |
12 | steps:
13 | - uses: actions/checkout@v2
14 | - name: Switch to Xcode 12
15 | run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
16 | - name: Generate microsite
17 | run: |
18 | brew update-reset
19 | brew install nef
20 | brew install sourcekitten
21 | gem install bundler -v 2.0.2
22 | gem install cocoapods -v 1.9.1
23 | ./scripts/gen-docs.rb
24 | - name: Deploy microsite
25 | uses: peaceiris/actions-gh-pages@v3
26 | with:
27 | personal_token: ${{ secrets.DEPLOY_TOKEN }}
28 | publish_branch: gh-pages
29 | publish_dir: ./pub-dir
30 | disable_nojekyll: true
31 |
--------------------------------------------------------------------------------
/.github/workflows/nef-compile.yml:
--------------------------------------------------------------------------------
1 | name: nef Compilation
2 |
3 | on: [pull_request]
4 |
5 | jobs:
6 | build:
7 | runs-on: macos-latest
8 |
9 | steps:
10 | - uses: actions/checkout@v2
11 | - name: Switch to Xcode 12
12 | run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
13 | - name: Compile documentation
14 | run: |
15 | brew update-reset
16 | brew install nef
17 | gem install cocoapods -v 1.9.1
18 | nef compile --project Documentation.app
19 |
--------------------------------------------------------------------------------
/Bow.xcodeproj/BowTests_Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | CFBundleDevelopmentRegion
5 | en
6 | CFBundleExecutable
7 | $(EXECUTABLE_NAME)
8 | CFBundleIdentifier
9 | $(PRODUCT_BUNDLE_IDENTIFIER)
10 | CFBundleInfoDictionaryVersion
11 | 6.0
12 | CFBundleName
13 | $(PRODUCT_NAME)
14 | CFBundlePackageType
15 | BNDL
16 | CFBundleShortVersionString
17 | 1.0
18 | CFBundleSignature
19 | ????
20 | CFBundleVersion
21 | $(CURRENT_PROJECT_VERSION)
22 | NSPrincipalClass
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Bow.xcodeproj/Bow_Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Bow.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Bow.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "object": {
3 | "pins": [
4 | {
5 | "package": "RxSwift",
6 | "repositoryURL": "https://github.com/ReactiveX/RxSwift",
7 | "state": {
8 | "branch": null,
9 | "revision": "002d325b0bdee94e7882e1114af5ff4fe1e96afa",
10 | "version": "5.1.1"
11 | }
12 | },
13 | {
14 | "package": "SwiftCheck",
15 | "repositoryURL": "https://github.com/bow-swift/SwiftCheck.git",
16 | "state": {
17 | "branch": null,
18 | "revision": "748359f9a95edf94d0c4664102f104f56b1ff1fb",
19 | "version": "0.12.1"
20 | }
21 | }
22 | ]
23 | },
24 | "version": 1
25 | }
26 |
--------------------------------------------------------------------------------
/Bow.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SchemeUserState
5 |
6 | Bow-Package.xcscheme
7 |
8 |
9 | SuppressBuildableAutocreation
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/CHANGELOG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bow-swift/bow/a8c1a719cd8407dfae6ffeb6de1110177c4a7819/CHANGELOG
--------------------------------------------------------------------------------
/Cartfile:
--------------------------------------------------------------------------------
1 | github "ReactiveX/RxSwift" ~> 5.0.0
2 |
--------------------------------------------------------------------------------
/Cartfile.private:
--------------------------------------------------------------------------------
1 | github "typelift/SwiftCheck" ~> 0.12.0
2 |
3 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Composition.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Composition.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Dependency management.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Dependency management.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Documentation.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Documentation.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Documentation/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1.0
21 | NSHumanReadableCopyright
22 | Copyright © 2019. The nef authors.
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Effects.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Effects.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/FP concepts.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/FP concepts.playground/docs/docs/legal/credits/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: docs
3 | title: Credits
4 | permalink: /docs/legal/credits/
5 | ---
6 |
7 | # Credits
8 |
9 | 2019 - © The Bow Authors
10 |
11 | For a comprehensive list of contributors, [visit the repository](https://github.com/bow-swift/bow/graphs/contributors) on GitHub.
12 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/FP concepts.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Integrations.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Integrations.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2019 The nef Authors
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Legal.playground/Pages/Credits.xcplaygroundpage/Contents.swift:
--------------------------------------------------------------------------------
1 | // nef:begin:header
2 | /*
3 | layout: docs
4 | title: Credits
5 | */
6 | // nef:end
7 | /*:
8 | # Credits
9 |
10 | 2019 - © The Bow Authors
11 |
12 | For a comprehensive list of contributors, [visit the repository](https://github.com/bow-swift/bow/graphs/contributors) on GitHub.
13 |
14 | Bow is supported by [47 Degrees](https://www.47deg.com).
15 | */
16 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Legal.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Legal.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Optics.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Optics.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Patterns.playground/Pages/Polymorphic programs.xcplaygroundpage/Contents.swift:
--------------------------------------------------------------------------------
1 | // nef:begin:header
2 | /*
3 | layout: docs
4 | title: Polymorphic programs
5 | */
6 | // nef:end
7 | /*:
8 | # Polymorphic programs
9 |
10 | {:.intermediate}
11 | intermediate
12 |
13 | > Content under development.
14 | */
15 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Patterns.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Patterns.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Podfile:
--------------------------------------------------------------------------------
1 | target 'Documentation' do
2 | platform :osx, '10.14'
3 | use_frameworks!
4 |
5 | pod "Bow", :path => '../../..'
6 | pod "BowEffects", :path => '../../..'
7 | pod "BowRx", :path => '../../..'
8 | pod "BowOptics", :path => '../../..'
9 | pod "BowGeneric", :path => '../../..'
10 | pod "BowRecursionSchemes", :path => '../../..'
11 | pod "BowFree", :path => '../../..'
12 | pod "BowGenerators", :path => '../../..'
13 | pod "BowLaws", :path => '../../..'
14 | end
15 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Quick start.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Quick start.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Testing.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/Testing.playground/playground.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/MacOS/launcher:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | workspace="Documentation.xcworkspace"
4 | workspacePath=$(echo "$0" | rev | cut -f2- -d '/' | rev)
5 |
6 | open "`pwd`/$workspacePath/$workspace"
7 |
--------------------------------------------------------------------------------
/Documentation.app/Contents/Resources/AppIcon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bow-swift/bow/a8c1a719cd8407dfae6ffeb6de1110177c4a7819/Documentation.app/Contents/Resources/AppIcon.icns
--------------------------------------------------------------------------------
/Documentation.app/Contents/Resources/Assets.car:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bow-swift/bow/a8c1a719cd8407dfae6ffeb6de1110177c4a7819/Documentation.app/Contents/Resources/Assets.car
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem "fastlane"
4 | gem "cocoapods", "~> 1.8.1"
5 |
--------------------------------------------------------------------------------
/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "object": {
3 | "pins": [
4 | {
5 | "package": "RxSwift",
6 | "repositoryURL": "https://github.com/ReactiveX/RxSwift.git",
7 | "state": {
8 | "branch": null,
9 | "revision": "002d325b0bdee94e7882e1114af5ff4fe1e96afa",
10 | "version": "5.1.1"
11 | }
12 | },
13 | {
14 | "package": "SwiftCheck",
15 | "repositoryURL": "https://github.com/bow-swift/SwiftCheck.git",
16 | "state": {
17 | "branch": null,
18 | "revision": "748359f9a95edf94d0c4664102f104f56b1ff1fb",
19 | "version": "0.12.1"
20 | }
21 | }
22 | ]
23 | },
24 | "version": 1
25 | }
26 |
--------------------------------------------------------------------------------
/Sources/Bow/Data/Coreader.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | /// Coreader is a special case of CoreaderT / Cokleisli where F is `Id`, so it is equivalent to functions `(A) -> B`.
4 | public class Coreader: CoreaderT {
5 | /// Convenience initializer for Coreader
6 | ///
7 | /// - Parameter run: Function to be enclosed in this Coreader.
8 | public init(_ run: @escaping (A) -> B) {
9 | super.init { idA in run(idA^.value) }
10 | }
11 |
12 | /// Runs this Coreader function with the given input.
13 | ///
14 | /// - Parameter a: Input value for the function.
15 | /// - Returns: Output of the function.
16 | public func runId(_ a: A) -> B {
17 | self.run(Id(a))
18 | }
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/Sources/Bow/Data/Dictionary.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | // MARK: Instance of Semigroup for Dictionary
4 |
5 | extension Dictionary: Semigroup {
6 | public func combine(_ other: Dictionary) -> Dictionary {
7 | self.merging(other, uniquingKeysWith: { _, otherValue in otherValue })
8 | }
9 | }
10 |
11 | // MARK: Instances of Monoid for Dictionary
12 |
13 | extension Dictionary: Monoid {
14 | public static func empty() -> Dictionary {
15 | [:]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Sources/Bow/Data/Reader.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | /// Reader is a special case of ReaderT / Kleisli where F is `Id`, so it is equivalent to functions `(D) -> A`.
4 | public typealias Reader = ReaderT
5 |
6 | /// Alias over `ReaderTPartial`
7 | public typealias ReaderPartial = ReaderTPartial
8 |
--------------------------------------------------------------------------------
/Sources/Bow/Data/Set.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | // MARK: Instance of Semigroup for Set
4 | extension Set: Semigroup {
5 | public func combine(_ other: Set) -> Set {
6 | self.union(other)
7 | }
8 | }
9 |
10 | // MARK: Instance of Monoid for Set
11 | extension Set: Monoid {
12 | public static func empty() -> Set {
13 | Set()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Sources/Bow/Instances/BoolInstances.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | // MARK: Instance of Semigroup for Bool. Uses disjunction as combination of elements.
4 | extension Bool: Semigroup {
5 | public func combine(_ other: Bool) -> Bool {
6 | self || other
7 | }
8 | }
9 |
10 | // MARK: Instance of Monoid for Bool. Uses false as empty element.
11 | extension Bool: Monoid {
12 | public static func empty() -> Bool {
13 | false
14 | }
15 | }
16 |
17 | // MARK: Instance of Semiring for Bool. Uses conjunction as multiplication of elements and true as unit element.
18 | extension Bool: Semiring {
19 | public func multiply(_ other: Bool) -> Bool {
20 | self && other
21 | }
22 |
23 | public static func one() -> Bool {
24 | true
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Sources/Bow/Instances/StringInstances.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | // MARK: Instance of Semigroup for String, using concatenation as combination method
4 | extension String: Semigroup {
5 | public func combine(_ other: String) -> String {
6 | self + other
7 | }
8 | }
9 |
10 | // MARK: Instance of Monoid for String, using empty string as empty element
11 | extension String: Monoid {
12 | public static func empty() -> String {
13 | ""
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Sources/Bow/Typeclasses/Alternative.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | /// An Alternative is an `Applicative` with `MonoidK` capabilities.
4 | public protocol Alternative: Applicative, MonoidK {}
5 |
--------------------------------------------------------------------------------
/Sources/Bow/Typeclasses/Bimonad.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | /// A Bimonad has the same capabilities as `Monad` and `Comonad`.
4 | public protocol Bimonad: Monad, Comonad {}
5 |
--------------------------------------------------------------------------------
/Sources/Bow/Typeclasses/ComonadTrans.swift:
--------------------------------------------------------------------------------
1 | /// The ComonadTrans type class represents Comonad Transformers.
2 | public protocol ComonadTrans: Comonad {
3 | /// The input type parameter of this transformer.
4 | associatedtype W: Comonad
5 |
6 | /// Obtains the comonadic value contained in the provided comonad transformer.
7 | ///
8 | /// - Parameter twa: Value containing another comonadic value.
9 | /// - Returns: Contained comonadic value within the transformer.
10 | static func lower(_ twa: Kind) -> Kind
11 | }
12 |
13 | // MARK: Syntax for ComonadTrans
14 |
15 | public extension Kind where F: ComonadTrans {
16 | /// Obtains the comonadic value contained in the provided comonad transformer.
17 | ///
18 | /// - Returns: Contained comonadic value within the transformer.
19 | func lower() -> Kind {
20 | F.lower(self)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Sources/Bow/Typeclasses/Divisible.swift:
--------------------------------------------------------------------------------
1 | /// Divisible extends Divide by providing an empty value.
2 | public protocol Divisible: Divide {
3 | /// Provides an empty value for this Divisible instance
4 | static func conquer() -> Kind
5 | }
6 |
7 | // MARK: Syntax for Divisible
8 | public extension Kind where F: Divisible {
9 | /// Provides an empty value for this Divisible instance
10 | static func conquer() -> Kind {
11 | F.conquer()
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Sources/Bow/Typeclasses/MonadComprehensions/ReaderBindingExpression.swift:
--------------------------------------------------------------------------------
1 | /// Utility alias for `MonadReader.ask` in a monad comprehension.
2 | ///
3 | /// - Returns: Result of `MonadReader.ask`.
4 | public func ask() -> Kind {
5 | F.ask()
6 | }
7 |
--------------------------------------------------------------------------------
/Sources/Bow/Typeclasses/MonadComprehensions/WriterBindingExpression.swift:
--------------------------------------------------------------------------------
1 | /// Utility function for `MonadWriter.tell` in monad comprehensions.
2 | ///
3 | /// - Parameter w: Value for `MonadWriter.tell`.
4 | /// - Returns: A binding expression.
5 | public func tell(_ w: F.W) -> BindingExpression {
6 | |<-F.tell(w)
7 | }
8 |
--------------------------------------------------------------------------------
/Sources/Bow/Typeclasses/MonadTrans.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | /// A monad transformer makes a new monad out of an existing monad, such that computations of the old monad may be embedded in the new one.
4 | public protocol MonadTrans: Monad {
5 | /// The input type parameter of this transformer.
6 | associatedtype F: Monad
7 |
8 | /// Lift a computation from the F monad to the constructed monad.
9 | static func liftF(_ fa: Kind) -> Kind
10 | }
11 |
12 | extension Kind where F: MonadTrans {
13 | /// Lift a computation from the F monad to this monad.
14 | static func liftF(_ fa: Kind) -> Kind {
15 | F.liftF(fa)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Sources/Bow/Typeclasses/Monoidal.swift:
--------------------------------------------------------------------------------
1 | /// The Monoidal type class adds an identity element to Semigroupal type class by defining the function identity.
2 | ///
3 | /// Identity returns a specific identity `Kind` value for a given type F and A.
4 | ///
5 | /// This type class complies with the following law:
6 | /// fa.product(identity) == identity.product(fa) == identity
7 | ///
8 | /// In addition, the laws of Semigroupal type class also apply.
9 | ///
10 | public protocol Monoidal: Semigroupal {
11 |
12 | /// Given a type A, create a "identity" for a F value
13 | static func identity() -> Kind
14 | }
15 |
16 | // MARK: Syntax for Monoidal
17 | public extension Kind where F: Monoidal {
18 | static func identity() -> Kind {
19 | F.identity()
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Sources/BowEffects/Data/Internal/Dictionary+Extensions.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | func -(lhs: Dictionary, rhs: K) -> Dictionary {
4 | var copy = lhs
5 | copy.removeValue(forKey: rhs)
6 | return copy
7 | }
8 |
9 | func +(lhs: Dictionary, rhs: (K, V)) -> Dictionary {
10 | var copy = lhs
11 | copy[rhs.0] = rhs.1
12 | return copy
13 | }
14 |
15 | extension Dictionary {
16 | var arrayValues: [Value] {
17 | Array(values)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Sources/BowEffects/Data/Internal/DispatchTimeInterval+Extensions.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | extension DispatchTimeInterval {
4 | func toDouble() -> Double? {
5 | switch self {
6 | case .seconds(let value): return Double(value)
7 | case .milliseconds(let value): return Double(value) * 0.001
8 | case .microseconds(let value): return Double(value) * 0.000_001
9 | case .nanoseconds(let value): return Double(value) * 0.000_000_001
10 | case .never: return nil
11 | @unknown default: return nil
12 | }
13 | }
14 | }
15 |
16 | func >=(lhs: DispatchTimeInterval, rhs: DispatchTimeInterval) -> Bool {
17 | let now = DispatchTime.now()
18 | return now + lhs >= now + rhs
19 | }
20 |
21 | func -(lhs: DispatchTime, rhs: DispatchTime) -> DispatchTimeInterval {
22 | let l = Int(lhs.rawValue)
23 | let r = Int(rhs.rawValue)
24 | return .nanoseconds(Int(l - r))
25 | }
26 |
--------------------------------------------------------------------------------
/Sources/BowGeneric/Generic.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | public protocol Generic {
4 | associatedtype T
5 | associatedtype Repr
6 |
7 | func to(_ t: T) -> Repr
8 | func from(_ r: Repr) -> T
9 | }
10 |
--------------------------------------------------------------------------------
/Sources/BowOptics/Auto/AutoGetter.swift:
--------------------------------------------------------------------------------
1 | /// Protocol for automatic derivation of Getter optics
2 | public protocol AutoGetter: AutoOptics {}
3 |
4 | public extension AutoGetter {
5 | /// Generates a Getter for the field given by the key path.
6 | ///
7 | /// - Parameter path: Key path of the field.
8 | /// - Returns: A Getter optic focused on the provided field.
9 | static func getter(for path: KeyPath) -> Getter {
10 | return Getter(get: { whole in whole[keyPath: path] })
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Sources/BowOptics/Auto/AutoLens.swift:
--------------------------------------------------------------------------------
1 | /// Protocol for automatic derivation of lenses.
2 | public protocol AutoLens: AutoOptics {}
3 |
4 | public extension AutoLens {
5 | /// Generates a Lens for the field indicated by its key path.
6 | ///
7 | /// - Parameter path: Key path identifying the field where the Lens focuses.
8 | /// - Returns: A Lens focusing in the field.
9 | static func lens(for path: WritableKeyPath) -> Lens {
10 | return Lens(get: { whole in whole[keyPath: path] },
11 | set: { whole, part in whole.copy(with: part, for: path) })
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Sources/BowOptics/Auto/AutoOptics.swift:
--------------------------------------------------------------------------------
1 | /// Base protocol for optics automatic derivation.
2 | public protocol AutoOptics {}
3 |
4 | public extension AutoOptics {
5 | /// Creates a copy of this object, replacing the value at the given key path by the provided value.
6 | ///
7 | /// - Parameters:
8 | /// - value: New value for the field in the copy.
9 | /// - path: Key path of the field that will be modified in the copy.
10 | /// - Returns: A copy of this value with the modified field.
11 | func copy(with value: T, for path: WritableKeyPath) -> Self {
12 | var copy = self
13 | copy[keyPath: path] = value
14 | return copy
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Sources/BowOptics/DSL/Kind+Optics.swift:
--------------------------------------------------------------------------------
1 | import Bow
2 |
3 | // MARK: Optics extensions
4 | public extension Kind where F: Traverse {
5 | /// Provides a traversal based on the instance of `Traverse` for this type.
6 | static var traversalK: Traversal, A> {
7 | return KindTraversal()
8 | }
9 | }
10 |
11 | public extension Kind where F: Foldable {
12 | /// Provides a traversal based on the instance of `Foldable` for this type.
13 | static var foldK: Fold, A> {
14 | return Fold, A>.fromFoldable()
15 | }
16 | }
17 |
18 | private class KindTraversal: Traversal, A> {
19 | override func modifyF(_ s: Kind, _ f: @escaping (A) -> Kind) -> Kind> {
20 | return s.traverse(f)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Sources/BowOptics/Extensions/StateT+Optics.swift:
--------------------------------------------------------------------------------
1 | import Bow
2 |
3 | public extension StateT where F: Functor {
4 | /// Generalizes this StateT to a parent state, given a lens to focus from the parent to the child state.
5 | ///
6 | /// - Parameters:
7 | /// - lens: A Lens to focus from the parent state into the child state.
8 | /// - Returns: An `StateT` that produces the same computation but updates the state in a parent state.
9 | func focus(_ lens: Lens) -> StateT {
10 | self.focus(lens.get, lens.set)
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Sources/BowOptics/Instances/ConstOpticsInstances.swift:
--------------------------------------------------------------------------------
1 | import Bow
2 |
3 | // MARK: Optics extensions
4 | public extension Const {
5 | /// Provides an Iso to go from/to this type to its `Kind` version.
6 | static var fixIso: Iso, ConstOf> {
7 | return Iso(get: id, reverseGet: Const.fix)
8 | }
9 |
10 | /// Provides a Fold based on the Foldable instance of this type.
11 | static var fold: Fold, T> {
12 | return fixIso + foldK
13 | }
14 |
15 | /// Provides a Traversal based on the Traverse instance of this type.
16 | static var traversal: Traversal, T> {
17 | return fixIso + traversalK
18 | }
19 | }
20 |
21 | // MARK: Instance of `Each` for `Const`
22 | extension Const: Each {
23 | public typealias EachFoci = T
24 |
25 | public static var each: Traversal, T> {
26 | return traversal
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Sources/BowOptics/Instances/EitherOpticsInstances.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import Bow
3 |
4 | // MARK: Optics extensions
5 | public extension Either {
6 | /// Provides an Iso to go from/to this type to its `Kind` version.
7 | static var fixIso: Iso, EitherOf> {
8 | return Iso(get: id, reverseGet: Either.fix)
9 | }
10 |
11 | /// Provides a Fold based on the Foldable instance of this type.
12 | static var fold: Fold, B> {
13 | return fixIso + foldK
14 | }
15 |
16 | /// Provides a Traversal based on the Traverse instance of this type.
17 | static var traversal: Traversal, B> {
18 | return fixIso + traversalK
19 | }
20 | }
21 |
22 | // MARK: Instance of `Each` for `Either`
23 | extension Either: Each {
24 | public typealias EachFoci = B
25 |
26 | public static var each: Traversal, B> {
27 | return traversal
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Sources/BowOptics/Instances/IdOpticsInstances.swift:
--------------------------------------------------------------------------------
1 | import Bow
2 |
3 | // MARK: Optics extensions
4 | public extension Id {
5 | /// Provides an Iso to go from/to this type to its `Kind` version.
6 | static var fixIso: Iso, IdOf> {
7 | return Iso(get: id, reverseGet: Id.fix)
8 | }
9 |
10 | /// Provides a Fold based on the Foldable instance of this type.
11 | static var fold: Fold, A> {
12 | return fixIso + foldK
13 | }
14 |
15 | /// Provides a Traversal based on the Traverse instance of this type.
16 | static var traversal: Traversal, A> {
17 | return fixIso + traversalK
18 | }
19 | }
20 |
21 | // MARK: Instance of `Each` for `Id`
22 | extension Id: Each {
23 | public typealias EachFoci = A
24 |
25 | public static var each: Traversal, A> {
26 | return traversal
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Sources/BowOptics/Instances/IorOpticsInstances.swift:
--------------------------------------------------------------------------------
1 | import Bow
2 |
3 | // MARK: Optics extensions
4 | public extension Ior {
5 | /// Provides an Iso to go from/to this type to its `Kind` version.
6 | static var fixIso: Iso, IorOf> {
7 | return Iso(get: id, reverseGet: Ior.fix)
8 | }
9 |
10 | /// Provides a Fold based on the Foldable instance of this type.
11 | static var fold: Fold, B> {
12 | return fixIso + foldK
13 | }
14 |
15 | /// Provides a Traversal based on the Traverse instance of this type.
16 | static var traversal: Traversal, B> {
17 | return fixIso + traversalK
18 | }
19 | }
20 |
21 | // MARK: Instance of `Each` for `Ior`
22 | extension Ior: Each {
23 | public typealias EachFoci = B
24 |
25 | public static var each: Traversal, B> {
26 | return traversal
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Sources/BowOptics/Instances/OptionOpticsInstances.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import Bow
3 |
4 | // MARK: Optics extensions
5 | public extension Option {
6 | /// Provides an Iso to go from/to this type to its `Kind` version.
7 | static var fixIso: Iso