(concat (take 1 trends) [shorts] (take-last 3 trends))
;=>	([827 828 829] [10 11 12] [1 2 3] [4 5 6] [7 8 9])

OR

(concat [(first trends)] [shorts] (take-last 3 trends))

Into works nicely as well

On Apr 19, 2013, at 12:24 PM, Robin Kraft <notifications@github.com> wrote:

> In src/clj/forma/hadoop/jobs/forma.clj:
> 
> > +        tele-series (f/tele-ts tele-start-idx tele-end-idx val-ts)
> > +        ;;takes the last telescoping series (the longest one), and computes
> > +        ;;the windowed trends, and then the moving averages. Then does
> > +        ;;reductions min on the moving averages. We want the same
> > +        ;;number of short-stats as there are tele-series (remember
> > +        ;;each short stat is the largest short term drop observed over
> > +        ;;that series).
> > +        short-stats (take-last (count tele-series)
> > +                               (a/short-stat-all long-block window (last tele-series)))
> > +        calculate #(new-trends window long-block
> > +                               ts-start-period % rain-ts)
> > +        all-trends-but-short (mu/transpose
> > +                              (map calculate tele-series))]
> > +    [(concat (take 1 all-trends-but-short)
> > +             [short-stats]
> > +             (take-last 3 all-trends-but-short))]))
> This concat is causing tests to fail, but using into fixes it. I'll submit a patch shortly.
> 
> (def trends [[827 828 829] [1 2 3] [4 5 6] [7 8 9]])
> (def shorts [10 11 12])
> 
> (concat (first trends) shorts (take-last 3 trends))
> ;=> [827 828 829 [10 11 12 ([1 2 3] [4 5 6] [7 8 9])]
> 
> (info [(first trends) shorts] (take-last 3 trends))
> ;=> [[827 828 829] [10 11 12] [1 2 3] [4 5 6] [7 8 9]]
> —
> Reply to this email directly or view it on GitHub.
>