extendr_api::functions

Function global_function

Source
pub fn global_function<K: Into<Robj>>(key: K) -> Result<Robj>
Expand description

Get a global function from global_env() and ancestors.

use extendr_api::prelude::*;
test! {
    let ls = global_function(sym!(ls))?;
    assert_eq!(ls.is_function(), true);
}