Tinkerbell

  • Small utility libraries
  • Driven (mostly) by webdev and UI
  • Very "haxey"
  • Active development

tink_core

  • Very generic building blocks
  • Base dependency for tink and coconut

tink_core 2.0

  • Callback
  • Signal
  • Lazy
  • Future
  • Outcome
  • Promise
  • ...and more

Callback<T>

  • Abstraction over T->Void
  • Also supports ()->Void
  • And Array<Callback<T>>
  • Guards against stack overflows

CallbackLink

  • Generic type for "cancellation"
    • Unsubscribe
    • Abort process
    • Dispose resources
    • etc.
  • Single-use (do nothing after first use)
  • Composable (pairs, sequences)
  • Created from function(s)

CallbackList<T>

  • Generic "listener" list
  • Adds Callback<T>
  • Return CallbackLink
  • Handles modification during call

Signal<T>

  • Type-safe signals \o/
  • CallbackList with extras
  • (Optionally) lazy and suspendable
  • Map/filter and more

Lazy<T>

  • Generic type for lazy computations
  • Created from factory function or a known value
  • Map/flatMap
  • Implicit conversion to T

Future<T>

  • Generic type for dealing with asynchrony
  • (Optionally) lazy and suspendable
  • Map/flatMap/etc.
  • inParallel/inSequence

Outcome<Data,Failure>

  • Generic Success/Failure container
  • Type-safe enum type
  • Convenience extension methods

Promise<T>

  • Essentially a Future<Outcome<T,Error>>
  • All the features of Future, plus sugar
  • Convenience functions for dealing with errors

Our helpers

  • promise.then(onSuccess, onError)
  • FutureTools/PromiseTools.combine()
  • future.with*Loader()
Made with Slides.com