# hash.function

From memofunc v1.0.2
by Roy Wetherall

##### Hash

Hashes a function, but considering the formals and body, thus the resulting has is influenced by changes to signature and implementation.

##### Usage

```
# S3 method for `function`
hash(value)
```

##### Arguments

- value
value to hash

##### Value

hashed value as a string

##### Examples

```
# NOT RUN {
my.function <- function (x, y) x+y
# a list of values to hash
values <- list(
"Hello world!",
101,
3.142,
TRUE,
my.function,
(function (x, y) x+y),
functionCall(my.function, call("my.function", 10, 10)),
list(a=1, b=2, c="hello")
)
# hash the values in the list
(hashes <- lapply(values, hash))
# Note that functions with the same body will have the same hash
hashes[[5]] == hashes[[6]]
# }
```

*Documentation reproduced from package memofunc, version 1.0.2, License: GPL-3*

### Community examples

Looks like there are no examples yet.