Skip to content

Pop

Source code

Description

Pop the latest expression and return the input(s) of the popped expression.

Usage

<Expr>$meta$pop()

Value

A list of expressions which in most cases will have a unit length. This is not the case when an expression has multiple inputs, for instance in a $fold() expression.

Examples

library("polars")

e1 = pl$lit(40) + 2
e2 = pl$lit(42)$sum()

e1
#> polars Expr: [(dyn float: 40.0) + (dyn float: 2.0)]
e1$meta$pop()
#> [[1]]
#> polars Expr: dyn float: 2.0
#> 
#> [[2]]
#> polars Expr: dyn float: 40.0
e2
#> polars Expr: dyn float: 42.0.sum()
e2$meta$pop()
#> [[1]]
#> polars Expr: 42.0