Comments (2)
In my experiences in some code reviews in some big or small projects like OTP, Ejabberd, ... . Erlang developers often don't like to use --
operator in produnction env. (at least in main parts of code which should be run for many times). so when you include this lib's header file, Only you can use --
operator in tuples, lists or maps for seeing difference of two lists.
example:
...
-include_lib("pipeline/include/pipeline).
test() ->
{Diff} = {[1,2,3] -- [1]}. % Diff = [2,3]
technically in compile time, it does not search in tuples, lists, maps for pipelining.
from pipeline.
I'm still working on new library which supports pipeline and other function compositions.
For example writing:
?bool_exec( a() -- b() -- c() )
will equal to writing
case a() of
true ->
case b() of
true ->
c();
false ->
false
end;
false ->
false
end.
or writing:
?ok_pipeline( a() -- b() -- c() )
will equal to writing:
case a() of
{ok, Result1} ->
case b(Result1) of
{ok, Result2} ->
c(Result2);
{error, _}=Err ->
Err
end;
{error, _}=Err ->
Err
end.
If you need just pipelining, use this and you cant use --
operator with its default usage in every place. In next library which supports pipeline too, i will push it in a macro like ?pipeline
, then you can use --
operator outside that macro with its default usage.
from pipeline.
Related Issues (3)
- fasle -> false HOT 3
- Railway oriented programming HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pipeline.