bow-swift / bow Goto Github PK
View Code? Open in Web Editor NEW๐น Bow is a cross-platform library for Typed Functional Programming in Swift
Home Page: https://bow-swift.io
License: Other
๐น Bow is a cross-platform library for Typed Functional Programming in Swift
Home Page: https://bow-swift.io
License: Other
Add API reference for Ior
data type.
A few issues with how Bow uses operators:
All the custom operators introduced use the same precedence group that ships with Swift (AdditionPrecedence
). This prevents them from playing nicely with one another. For example, a Kleisli chain with pure compositions requires parenthesizing when >>>
should take precedence over >=>
.
f
>>> impureG
>=> pureH
>>> impureI
>=> impureJ
Data defines infix operator >>=
, but Swift already ships with >>=
for bitwise shift assignment. Swift libraries tend to define >>-
or >>>=
instead as a result. In general, >>=
seems less useful in Swift because you can define flatMap
as an infix method, preserving readability where bind creates nesting.
Optics overloads +
for composition. It might make more sense to use <<<
or introduce a new operator. PureScript's profunctor package once defined ..
, though they use plain-ole <<<
these days.
Add API docs for Typeclass
.
One relevant thing could be integrate code coverage in the project.
Mode info: https://github.com/codecov/example-swift
What do you think?
I can do it if you are agree.
Write a document with guidelines for new contributors.
Add API reference for Either
data type.
Add API docs for Curry
.
Add RxSwift support to the Effects package, similar to the Arrow counterpart with RxJava 2.
The purpose is to implement typeclasses with less boilerplate.
Add API reference for ArrayK
data type.
Swift can define ap
in a much more readable (left-to-right, non-nested) format that matches Haskell. By introducing a generic at function scope we can constrain F
's A
to be a function between generics:
-public func ap<B>(_ ff: F<(A) -> B>) -> F<B>
+public func ap<A1, B>(_ fa: F<A1>) -> F<B> where A == (A1) -> B
And in practice:
Option.pure(add).ap(one).ap(two)
// vs. the right-to-left, awkwardly nested:
two.ap(one.ap(Option.pure(add)))
FWIW many functional libraries in Swift introduce the <*>
operator, as another option. That could be an alternate consideration if the inconsistency with Arrow is an issue, though I assume Bow should be optimized for Swift syntax in general.
Add API docs for Memoization
.
The description of the Podfile publishes only the Swift files that are on Sources/Bow
, but not in the subfolders. Therefore, only the files on the top level folder are published.
Add API docs for Predef
.
Add API docs for MaybeInstances
Add API documentation for BooleanFunctions.
The current implementation forces users of the library to depend on RxSwift and BrightFutures. We should split it into three:
Any other integration with other libraries should as well be kept separately, so that users do not need to depend on unnecessary stuff.
Add API documentation for NumberInstances.
My iOS friends are about to try Bow but we are a little bit confused about naming of Option
/Maybe
.
Arrow for Kotlin is using Option
, Bow is using Maybe
and name Option is used for nullable types T?
Maybe
is also in conflict with RxSwift's Maybe
.
What are the reasons for using Maybe
instead of Option
in Bow?
Thanks for any hint!
We need to define and test/document/describe the flow to automate the Bow documentation generation and its website deployment process.
Missing things regarding optics:
At
, Each
, FilterIndex
, Index
Fold
, Getter
, Iso
, Lens
, Optional
, Prism
, Setter
, Traversal
Add API docs for Reverse
.
Add API docs to Kind
.
Add an issue template with common sections.
Hi there folks,
We should add the Google Analytics tracker to our websites to have more information about the visits and the impact of our library (and in the future to all the Gdocs to see how it works and how to improve it).
Here I attach the tracker we have to add it to the head of the site
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-18433785-19"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-18433785-19');
</script>
Cheers!
Currently, the library can be consumed via CocoaPods and Carthage. We need to update Swift Package Manager file (Package.swift) and make sure the library can be consumed using this tool.
I will create a Jekyll site
Cocoapods is complaining because we don't have a license file.
Create API reference for Option
.
Documents methods and instances for Id
.
Currently, the Xcode project only includes BowTests as a test target. We need to add all our tests targets as schemes.
If you are documenting one of these classes, create a separate issue and assign it to yourself so that everyone knows what is being done.
We will keep track of what is documented here. For now, I will list all current classes in the library. We should also generate the HTML documents based on this (perhaps using Jazzy or similar). Sorted by priority and with an indicator of difficulty (๐ easy, ๐ medium, ๐ hard to document):
Data
Instances
Syntax
Typeclasses
Transformers
Effects
Effects/Foundation
Effects/Rx
Effects/Typeclasses
Arrow
Optics/Typeclasses
Optics
Optics/DSL
Optics/Instances
Optics/STD
Optics/Tuple
Optics/Auto
Free
RecursionSchemes
RecursionSchemes/Data
RecursionSchemes/Typeclasses
Generic
Add API docs for PartialApplication
.
Add API docs for BoolInstances.swift
@truizlop Maybe Israel and Calvellido can help with this but this is largely influenced by the options and choices you have on Swift.
I've made a first pass review of the library to see what is missing and I've found some things
I didn't check in depth to see if there are methods missing yet
@raulraja
Add a PR template with common sections.
Adding some frameworks through Carthage has polluted a little bit the project and it needs to be cleaned.
There are some data types that match names in Arrow but are not aligned with how they are called in Swift. The following data types should be renamed to:
It looks like not all the files are included in every target; therefore, building the library for other targets (like watchOS) fails to find some of the files.
Add API docs to StringInstances
.
Made the library compatible with the 3 most used dependency managers:
Write a code of conduct for the repository.
Operators >=>
and >>=
were marked as deprecated in the previous release. We are deleting them for next version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.