# s4

    Code
      track <- setClass("track", slots = c(x = "numeric", y = "numeric"))
      construct(track)
    Output
      setClass(
        "track" |>
          structure(package = "constructive"),
        slots = c(x = "numeric", y = "numeric")
      )
    Code
      t1 <- track(x = 1:3, y = 4:6)
      construct(t1)
    Output
      new(
        "track" |>
          structure(package = "constructive"),
        x = 1:3,
        y = 4:6
      )
    Code
      trackCurve <- setClass("trackCurve", slots = c(smooth = "numeric"), contains = "track")
      construct(trackCurve)
    Output
      setClass(
        "trackCurve" |>
          structure(package = "constructive"),
        slots = c(smooth = "numeric", x = "numeric", y = "numeric")
      )
    Code
      t1s <- trackCurve(t1, smooth = 1:3)
      construct(t1s)
    Output
      new(
        "trackCurve" |>
          structure(package = "constructive"),
        smooth = 1:3,
        x = 1:3,
        y = 4:6
      )
    Code
      construct(prototype(1, a = 2))
    Output
      prototype(1, a = 2)
    Code
      construct(getClass("numeric"))
    Output
      getClassDef("numeric", package = "methods")

