Header menu logo TDesu.FSharp

Byref Module

Named, in-place mutation helpers for byref values. Every function takes the byref first, so they read the same way at the call site as the built-in <- assignment they replace.

Example

 let mutable total = 0
 for x in items do
     Byref.add &total x
val mutable total: int
val x: obj

Functions and values

Function or value Description

Byref.add a v

Full Usage: Byref.add a v

Parameters:
    a : byref<^a> - The byref to add to.
    v : ^a0 - The value to add.

Modifiers: inline
Type parameters: ^a, ^a

Adds a value to a byref in-place.

a : byref<^a>

The byref to add to.

v : ^a0

The value to add.

Byref.dec a

Full Usage: Byref.dec a

Parameters:
    a : byref<^a> - The byref value to decrement.

Modifiers: inline
Type parameters: ^a, ^a

Decrements a byref numeric value in-place by one.

a : byref<^a>

The byref value to decrement.

Byref.div a v

Full Usage: Byref.div a v

Parameters:
    a : byref<^a> - The byref to divide.
    v : ^a0 - The value to divide by.

Modifiers: inline
Type parameters: ^a, ^a

Divides a byref by a value in-place.

a : byref<^a>

The byref to divide.

v : ^a0

The value to divide by.

Byref.inc a

Full Usage: Byref.inc a

Parameters:
    a : byref<^a> - The byref value to increment.

Modifiers: inline
Type parameters: ^a, ^a

Increments a byref numeric value in-place by one.

a : byref<^a>

The byref value to increment.

Byref.mul a v

Full Usage: Byref.mul a v

Parameters:
    a : byref<^a> - The byref to multiply.
    v : ^a0 - The value to multiply by.

Modifiers: inline
Type parameters: ^a, ^a

Multiplies a byref by a value in-place.

a : byref<^a>

The byref to multiply.

v : ^a0

The value to multiply by.

Byref.setv a v

Full Usage: Byref.setv a v

Parameters:
    a : byref<'a> - The byref to assign to.
    v : 'a - The value to assign.

Modifiers: inline
Type parameters: 'a

Assigns a value to a byref in-place.

a : byref<'a>

The byref to assign to.

v : 'a

The value to assign.

Byref.sub a v

Full Usage: Byref.sub a v

Parameters:
    a : byref<^a> - The byref to subtract from.
    v : ^a0 - The value to subtract.

Modifiers: inline
Type parameters: ^a, ^a

Subtracts a value from a byref in-place.

a : byref<^a>

The byref to subtract from.

v : ^a0

The value to subtract.

Type something to start searching.