Skip to content
benjchristensen edited this page Jan 25, 2013 · 6 revisions
# Hello World!

A requisite "Hello World!" which creates an Observable from a list of Strings, subscribes to the Observable with a function that will print "Hello %!" for each string.

(defn hello
  [&rest]
  (-> (Observable/toObservable &rest)
    (.subscribe #(println (str "Hello " % "!")))))
=> (hello ["Ben" "George"])
Hello Ben!
Hello George!

sidebar

Clone this wiki locally