This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { of, Stream, Scheduler, Sink, Source } from 'most' | |
| import { curry2, CurriedFunction2 } from '@most/prelude' | |
| class ThreadSource<T, R> implements Source<R> { | |
| constructor (private fn: (a1: T) => void, private arg: T) { | |
| } | |
| run (sink: Sink<R>, scheduler: Scheduler) { | |
| const fnContextStr = `(${this.fn.toString()})(${JSON.stringify(this.arg)})` | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const compose = (f, g) => (x) => f(g(x)) | |
| const getAmountAndSliceMxrbStr = ev => ev.querySelector('.amount').textContent.slice(0, -5).split(',').join('') | |
| const play = (url) => new Audio(url).play() | |
| const soundChaChing = () => play('http://soundbible.com/mp3/Cha_Ching_Register-Muska666-173262285.mp3') | |
| const roundIt = compose(Math.round, | |
| compose(Number, | |
| getAmountAndSliceMxrbStr)) | 
OlderNewer