type: Create a Q7 Type

Description Usage Arguments Value Examples

View source: R/core.R

Description

Create a Q7 Type

Usage

1
type(x = function() { }, s3 = "Q7default")

Arguments

x

function or expression; becomes the definition of the object

s3

S3 class of the object; necessary when using

Value

Q7 type; function

Examples

1
2
3
4
5
6
7
8
Adder <- type(function(num1, num2){
    add_nums <- function(){
        num1 + num2
    }
 })

myAdder <- Adder(1, 2)
myAdder$add_nums()

iqis/foo documentation built on June 7, 2020, 5:15 a.m.