First time here, and just a few hours into Racket... 
It is not going to be rocket science ;-).

  I am using Emacs and org-mode to map each heading of an org file to a html 
  Result: one org file → one static website.

  The org file contains data that is exported to a tsv file: 

  A code block in the org file is evaluated:

  And produces a stacked-chart from the tsv data:

The tsv data is parsed into a kind of matrix `M` where each cell `M[i][j]` is a
  ex: `M[i][0]` is the column "day" i.e. contains dates
      `M[i][1]` is the column "description" i.e. contains strings

In order to use operations over "day" column (adding dates, ...) it is needed to
parse that column with something like: `iso8601->date` but not the "description"

So, it is needed to apply a vector of functions `vF = [f_0,f_1,...]` to `M =
[col_0,col_1,...]` such that: `(matrix-apply vF M) = M'` where:

                M' = [f_0(col_0),f_1(col_1),...,f_n(col_n)]

Well, this function `matrix-apply` does not seem to exist and my attempt at
implementing it feels clunky to say the least (ex: fs is not a vector):

    (define (matrix-apply fs m)
      (cond [(= (length fs) (matrix-num-cols m))
              (map (λ (f_col)
                      (λ (mat) (matrix-map (car f_col) mat))
                      (cdr f_col)))
                    (matrix-cols m2))))]
            [#t (error fs)]))
    (define m2 (matrix [[1 2 3 4]
                        [1 2 3 4]]))
    (matrix-apply (list sqr sqr sqr sqr) m2)

    => (array #[#[1 4 9 16] #[1 4 9 16]])

Am I missing the elephant in the corridor? Is an implementation floating


You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to