Skip to content

OrdinaryNick/RxSmalltalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RxSmalltalk

Simple implementation of ReactiveX in Smalltalk (Pharo).

Actual state

  • Supports few creations methods for Observable: fromArray, just, empty, never, raise, ...
  • Observable transformation functions: map, window, buffer, scan

Some examples

Some of creation methods.

Observable array: { 'Nice' . 5 . 'Ok' }.
Observable empty.
Observable just: 1.
Observable never.
Observable raise: Error.

Some of transformation functions.

observable := Observable range: 1 to: 12.
(observable window: 2 skip: 3) subscribe: observer.
(observable map: [ :x | x - 1 ]) subscribe: observer

Some complex example

| observer observable |
observer := TranscriptObserver new.
observable := Observable range: 1 to: 10.
((((observable map: [ :x | x - 1 ]) map: [ :x | x asString , ' ']) scan: [:x :y | x == 0 ifTrue: [y] ifFalse: [x , y].])  buffer: 2 skip: 4) subscribe: observer.

Posts about implementation

Roadmap

  • Add Disposable
  • Add cancelability
  • Add filter functions
  • Add other Observable functions

About

Implementation of ReactiveX in Smalltalk (Pharo).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors