Seems that I found a bug
Hello. Thanks for your great transpiler.
I think I found a bug related with transpiling loop
macro. Here is the code that I try to use:
(ps:ps (loop for price in prices
with start = price.date
with value = (chain price value)
with end = (@ price date)
unless (= value (@ price value))
collect (prog1
(create start start
end prev
value value)
(setf start (@ price date)
value (@ price value)))
do (setf end (@ price date))))
Here is what I get:
(function () {
var val1556;
var _js1554 = prices.length;
var start = price.date;
var value = chain(price, value);
var end = at(price, date);
var collect1555 = [];
for (var _js1553 = 0; _js1553 < _js1554; _js1553 += 1) {
var price = prices[_js1553];
if (value !== at(price, value)) {
collect1555.push((val1556 = create(start, start, end, prev, value, value), ((start = at(price, date), value = at(price, value)), val1556)));
};
end = at(price, date);
};
return collect1555;
})();
May be I'm doing something wrong, but seems that @
and chain
do not recognises inside loop
.
Thanks in advance.