Skip to content

Get function name from function #378

@ldemailly

Description

@ldemailly

first/rest/defun in #210 / #221 allows extraction of functions args/body and recreation - except to get the name

as side note, str(func) prints really weird stuff

func xor(a,b) {a^b}
str(xor)
"{[0x14000452930 0x14000452960] 0x140004528c8 func (a,b){a^b} 0x1400042dbe0 0x140000dccc0 false false}"

note we fixed it for gofuncs for examples/functions_list.gr such as str(eval(name)) prints the help we can probably do same or have
some inspect or map with the name if any (issue being if passing a lambda)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions