Skip to content

Commit

Permalink
better example
Browse files Browse the repository at this point in the history
  • Loading branch information
rksm committed Sep 24, 2014
1 parent 5475fdd commit 9de68c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/simple-connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ con.on("error", function(err) {
function cljEval(next) {
var expr = '(+ 3 4)';
con.eval(expr, function(err, result) {
console.log('%s => %s', expr, util.inspect(result));
var value = result.reduce(function(result, msg) {
return msg.value ? result + msg.value : result; }, "");
console.log('%s => %s', expr, value);
next();
});
}
Expand Down

0 comments on commit 9de68c1

Please sign in to comment.