You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As is described here, adding a single column allows you to access the previous row with prev() and the new value of the previous row with prev().newValue<T>().
This enables:
df.add("fibonacci") {
if (index() <2) 1else prev()!!.newValue<Int>() + prev()!!.prev()!!.newValue<Int>()
}
I'd expect this to be equivalent:
df.add {
"fibonacci" from {
if (index() <2) 1else prev()!!.newValue<Int>() + prev()!!.prev()!!.newValue<Int>()
}
}
but unfortunately, since from {} provides a DataRow as context instead of AddDataRow, newValue() is unavailable.
I don't know whether this was done due to a technical limitation, but if it was an oversight it surely must be added.
The text was updated successfully, but these errors were encountered:
As is described here, adding a single column allows you to access the previous row with
prev()
and the new value of the previous row withprev().newValue<T>()
.This enables:
I'd expect this to be equivalent:
but unfortunately, since
from {}
provides aDataRow
as context instead ofAddDataRow
,newValue()
is unavailable.I don't know whether this was done due to a technical limitation, but if it was an oversight it surely must be added.
The text was updated successfully, but these errors were encountered: