Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Pure/General/   (Isabelle Prover Version 2025-1©)  Datei vom 16.11.2025 mit Größe 784 B image not shown  

Quelle  array.ML

  Sprache: SML
 

(*  Title:      Pure/General/array.ML
    Author:     Makarius

Additional operations for structure Array, following Isabelle/ML conventions.
*)


signature ARRAY =
sig
  include ARRAY
  val nth: 'a array -> int -> 'a
  val upd: 'a array -> int -> 'a -> unit
  val forall: ('a -> bool) -> 'a array -> bool
  val member: ('a * 'a -> bool) -> 'a array -> 'a -> bool
  val fold: ('a -> 'b -> 'b) -> 'a array -> 'b -> 'b
  val fold_rev: ('a -> 'b -> 'b) -> 'a array -> 'b -> 'b
end;

structure Array: ARRAY =
struct

open Array;

fun nth arr i = sub (arr, i);
fun upd arr i x = update (arr, i, x);

val forall = all;

fun member eq arr x = exists (fn y => eq (x, y)) arr;

fun fold f arr x = foldl (fn (a, b) => f a b) x arr;
fun fold_rev f arr x = foldr (fn (a, b) => f a b) x arr;

end;

Messung V0.5 in Prozent
C=98 H=92 G=94

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-06-29) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.