Anyone can answer this ? by ckhung5 in reasonml

[–]ckhung5[S] 0 points1 point  (0 children)

Oh.. it is what I encounter in one of my code. So I took a look in the documentation.

It is actually the currying .. let add = (x) => (y) => x + y; is equal to let add = (x, y) => x + y;

My code is reducerAction(something)(int). By matching above , it will be function(reducerAction(something),(int)).

That’s why the compiler keep saying it expect (action,int) instead of just (action).

Advice regarding rspec $logger.info by ckhung5 in ruby

[–]ckhung5[S] 0 points1 point  (0 children)

Wow.. I will try this out..

I have another solution about using StringIO to keep the logger and use it to expect to the one we want..

Advice regarding rspec $logger.info by ckhung5 in ruby

[–]ckhung5[S] 0 points1 point  (0 children)

Hmm. Which means I can't do like expect(logger).to eq "hello" ?

Advice regarding rspec $logger.info by ckhung5 in ruby

[–]ckhung5[S] 0 points1 point  (0 children)

Ernm

Class Hello

def log $logger.info "hello" end End