Hi all,
I wrote a blog post on some more advanced use of Martian, a library for
abstracting HTTP integration with other systems.
All these use cases leverage the fact that Martian separates your data (the
*what*) from the HTTP implementation details (the *how*) and lets you get
on with connect
Hi Oliy,
In some ways this resonates with a thought I’ve had for a while, which sort of
appeared while working on a spring-boot application in java.
So in Spring-boot, you have classes annotated as controllers, methods annotated
as request handlers which indicate what params and such they take
Hi Erik,
One of the philosophies of Martian was that it was not a "closed" system so
that it made no demands on the server, and you can use it with servers that
aren't yours and can't be changed. What you're describing is very much
server-side testing, so Martian doesn't help directly there.
H
I have this function:
(defn add1 [x]
(+ 1 x))
which is just a very simple function that adds 1.
I now want to create a new function called add2 that uses add1 twice.
I have tried
(defn add2 [x]
(add1 (add1 [x]))
but this doesn't work. (Can someone explain why this doesn't work. I think
it
Your inner (add1 [x]) is calling add1 with a vector containing x, you
want (add1 x):
(defn add2 [x]
(add1 (add1 x))
HTH
On 10 November 2016 at 14:51, 'Rickesh Bedia' via Clojure
wrote:
> I have this function:
> (defn add1 [x]
> (+ 1 x))
> which is just a very simple function that adds 1
The issue is (add1 (add1 [x])) is malformed: you probably mean (add1 (add1 x)).
An addn function could be implemented with iterate:
(defn addn [n x]
(nth (iterate add1 x) n))
> On Nov 10, 2016, at 06:51, 'Rickesh Bedia' via Clojure
> wrote:
>
> I have this function:
> (defn add1 [x]
>
Not to try to force the last word, but I have already created the symmetry
that I desire locally:
(defn not-not-any?
[pred coll]
(not (not-any? pred coll)))
On Tuesday, November 8, 2016 at 8:27:09 AM UTC-8, Colin Yates wrote:
>
> > Back at ya. I respect your opinion - I just see things diff