Giter VIP home page Giter VIP logo

erlando's People

Contributors

amtal avatar depressed-pho avatar dpw avatar dumbbell avatar eduardsergeev avatar michaelklishin avatar slepher avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

alexanderkai

erlando's Issues

could not process correctly while node changes when type is pre

bug

do_traverse(Monad, F, Node, ChildrenLens) ->
    %% do form
    %% do([Monad ||
    %%           NNode <- F(pre, Node),
    %%           NNNode <- fold_children(Monad, F, NNode, ChildrenLens),
    %%           F(post, NNNode)
    %%    ]).

fold_children use NNode and lens of Node
when Node changes such as from {op, Line, Op, L, R} to {call, Line, Op, [L, R]}
it will use the wrong lens and cause crash

solution

lens should be generated by node
not pre-generated
it's a little complicated
I will do this later.

for now, do not change node structure in pre traverse, use post traverse instead

better interface for type instance pattern match

current type pattern match interface is

-erlando_type({error_m, [{ok, '_'}, {error, '_'}]}). 

will be convert to such pattern match in typeclass module

type({ok, _}) ->
  error_m; 
type({error, _}) ->
  error_m;

so these features are not supported

  • record used in pattern match
  • function guard test used in pattern match

there should have a better interface for type instance pattern match

state_t + error_t example?

Could you provide an example how to combine a state_t and error_t monad, please?

What I'm looking for is that my function can return either {ok, {Result, NewState}}, {ok NewState} or {error, Error}.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.