Yes I am very hopeful progress is made on that front! I've been having
great success with 'Constraint Handling Rules' (CHR), which serves as
my basis for solving type constraints. https://github.com/nsorenson/Clojure-CHR
contains my very preliminary crack at implementing this system.
The trick wit
What are your ideas? You can implement a balanced k-d tree on top a normal
vector, so that would be my first thought.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from n
Just to clarify, you want to conj a vector to itself? i.e. [1 2 3 4] --> [1
2 3 4 [1 2 3 4]] I'm curious what the application of this is.
Regarding the overhead of conj-ing to a vector: Clojure's data structures
make use of structural sharing so conjoining an element to the end of a
vector won'
I'm using clojure.walk/postwalk to rewrite terms in nested data
structures. However, I am unable to do this with types as defined by
defrecord, because they specify that the function "empty" throw a not-
implemented exception.
If I were able to over-ride this default implementation of 'empty' I
b
ion to the motivations and issues involved (though I'd
imagine you'd need a rough understanding of sequent calculus notation
to follow his description of the semantics of his type system).
[1] http://www.ccs.neu.edu/home/samth/
On Sep 27, 12:43 am, Paul Koerbitz wrote:
> Hi Nathan!
>
You're right that my use isn't strictly returning a collection with a size
of zero-- I'm treating empty more like 'default'. I'm thinking of its use in
clojure.walk, which simply creates a "blank" version of an arbitrary
collection in which to place the altered sub-forms. I can't find any other
Because the fn is wrapped in a lazy sequence, the effects won't run if you
ask for the same value again--
For instance:
(def a (iterate (fn [cnt]
(prn cnt)
;; save data to csv
(inc cnt)) 0))
(nth a 5) ... all the effects are fired.
(nth a 5) ...
Quite often I convince myself I need state or some effectful trigger, but
further thought reveals a simpler stateless approach.
That being said--if you absolutely need to be doing something based on
effects, something that absolutely can't be tracked via values in a purely
functional way--like
If you were feeling so inclined, you could structure this as a lazy sequence
(like 'partition' does)
(defn lazy-break
[coll]
(letfn [(break-paired [pairs]
(lazy-seq
(when-let [s (seq pairs)]
(let [p (doall (take-while (fn [[a b]] (= (inc a) b)) pairs))
After reading Oleg's lecture Typed tagless-final interpretations
( http://okmij.org/ftp/tagless-final/course/ ), I decided to see if
this was possible, or made any sense, to follow this style in
Clojure.
The idea is that, instead of representing a DSL syntax as a data
structure that you interpret,
I've always wanted to have an in-game scripting console that has
access to some of the functionality I'm used to in emacs, like
paredit. This would actually be really useful in achieving this, I
think!
On Jan 19, 1:44 am, Laurent PETIT wrote:
> Hello,
>
> 2011/1/18 Olek
>
> > Hi,
>
> > Here is a
201 - 211 of 211 matches
Mail list logo