Pudu programming language
Menu
API reference

Std.Test.Property.shrinkArray

1 declaration

fn

shrinkArray: &Array[T] -> Array[Array[T]]

This is a callable function.

What it does

Shorter sequences to try: whole chunks removed first, then one element

simplified at a time.

Chunks first because a counterexample is usually short and reaching it by

removing one element at a time takes as many tries as the sequence is long.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.
  • Names inside [ ] are type arguments, such as the item type held by a collection.

Back to Std.Test.PropertySearch related declarations