You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
I was playing around with the Task type and I have discovered that there's something wrong with the implementation of ap. Here is my snippet:
varTask=require('data.task');varreadToTask=(delay,resData)=>newTask((rej,res)=>isNaN(delay) ? res(resData) : setTimeout(res,delay,resData));varlift2=(f,m1,m2)=>m1.ap(m2.map(f));varjoin=s1=>s2=>s1+' : '+s2;varprogram=()=>lift2(join,readToTask(1000,'m1'),readToTask(NaN,'m2'))varprogram2=()=>readToTask(1000,'m1').chain(p1=>readToTask(NaN,'m2').map(p2=>join(p1)(p2)))varprogram3=()=>readToTask(1000,'m1').ap(readToTask(NaN,'m2').map(join))program().fork(console.error,console.log);// func is not a functionprogram2().fork(console.error,console.log);// worksprogram3().fork(console.error,console.log);// func is not a function
It could be that I am doing something wrong since there was a major release. I can't check it with 2.x versions as npm can't find any. Unfortunately, I haven't had a chance to dig into the implementation.
The text was updated successfully, but these errors were encountered:
Hello!
I was playing around with the Task type and I have discovered that there's something wrong with the implementation of
ap
. Here is my snippet:It could be that I am doing something wrong since there was a major release. I can't check it with 2.x versions as npm can't find any. Unfortunately, I haven't had a chance to dig into the implementation.
The text was updated successfully, but these errors were encountered: