Learn R Programming

sicher (version 0.1.0)

Readonly: Create a readonly type variant

Description

Creates a type that prevents reassignment after initial value is set.

Usage

Readonly(type)

Value

A readonly type modifier

Arguments

type

A sicher_type object

Examples

Run this code
PI %:% Readonly(Double) %<-% 3.14159
try(PI <- 3.0)  # Error: cannot reassign readonly

Run the code above in your browser using DataLab