leanprover-community / mathlib

  • Home
  • Zulip archive
  • API documentation
  • Lean web editor
  • Links

Zulip Chat Archive

Stream: new members

Topic: default values in structure (lean4)


Yakov Pechersky (Oct 30 2022 at 16:02):

What's the right way to get default fallback values for a structure?

structure Node :=
  val : Nat
  name : String := ""

#print Node.mk -- constructor Node.mk : Nat → String → Node

It's not mentioned in TPIL4 either


Last updated: May 02 2025 at 03:31 UTC

Theme Simple by wildflame © 2016 Powered by jekyll