Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // const IF = a => f => a && f(a);
- var IF = (b, a) => f => b && f(a || b);
- // var If = (b, a) => f1 => f0 => (b ? f1 : f0)(a);
- const If = (a, fb) => f1 => f0 => (b => b ? f1(b) : f0(a))(fb(a));
- // 1:
- let id = defaultId || If([].slice.call(eventRow.children[1].querySelectorAll('a'), 0, -1), a => a.reverse()[1])(a => a.href)(ar => ar[0].href);
- // 2:
- let id;
- if (defaultId) id = defaultId
- else{
- let arr = [].slice.call(eventRow.children[1].querySelectorAll('a'), 0, -1);
- let a = arr.reverse()[1]
- id = a ? a.href : arr[0] .href;
- }
Add Comment
Please, Sign In to add comment