I have a very common pattern of "given a Foo, return a Bar," for example, given a user_id, return a User.  Is there a conventional naming pattern for these sorts of functions?  Following Joel on Software, I've personally used a lot of bar...
I'm writing an Electron application, and in this application I need to interact with some of the Node.js APIs - read files, get directory entries, listen to events.  Of course, I can write ClojureScript same way I would write JavaScript, but I wa...
I just started learning Clojure. One of the first things I noticed is that there are no loops. That's OK, I can recur. So let's look at this function (from Practical Clojure):  (defn add-up   "Adds up numbers from 1 to n"   ([n] (add-...
Is it possible to use third-party React components in an Om application?  I have a project written in ClojureScript with Om and I would like to use JedWatson/react-select, how should I approach this problem?...
I'd like to learn how to run JavaScript through Clojure and in particular implement this D3 graph in Clojure.   In my attempt to implement the above graphing method I encountered ClojureScript. However, I have been unsuccessful in its usage for t...
Is there a JavaScript equivalent to Clojure's "reductions" function or Python's itertools.accumulate? In other words, given an array [x_0, x_1, x_2 ... x_n-1] and a function f(prev, next), it would return an array of length n with val...
I would like to add seconds to a date in Clojurescript. In Javascript:  var t = new Date(); t.setSeconds(t.getSeconds() + 10);   If possible without requiring a library (such as cljs-time), for the simple reason that this is the only involvement I th...
I've got a clojure project in which I am generating some JavaScript.  Note that this is a clojure project, not a clojurescript project.  Right now my project.clj has (among other things):  :dependencies [[org/clojurescript "0.0-1806"]]...
Domain Specific Language in Clojure or Javascript  I'm considering writing a domain specific lanaguage for transforming and mapping CSV fields.  So for each line of the CSV file, the DSL would execute a set of rules, which would transform and map...
In his book: Clojure for the Brave and True, the author writes: Clojure also targets JavaScript and Microsoft Common Language Runtime (CLR).  What does he mean with this?...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.