From fe051afbdfcfc43401c4e7566698fdabf54eb1fb Mon Sep 17 00:00:00 2001 From: Adriano Meligrana <68152031+Tortar@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:21:59 +0200 Subject: [PATCH] Formatting fix --- README.md | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 1f84a57..e49b35a 100644 --- a/README.md +++ b/README.md @@ -28,22 +28,23 @@ julia> @hybrid struct S{Y} <: AbstractS{Y} which in this case it generates: ```julia -abstract type AbstractS_Mut{Y} <: AbstractS{Y} end -abstract type AbstractS_Immut{Y} <: AbstractS{Y} end - -mutable struct S_Mut{Y} <: AbstractS_Mut{Y} - const x::Int - y::Y - z::Float64 -end - -struct S_Immut{Y} <: AbstractS_Immut{Y} - x::Int - y::Y - z::Float64 -end - -const S = Union{S_Immut{Y}, S_Mut{Y}} where Y +julia> abstract type AbstractS_Mut{Y} <: AbstractS{Y} end + +julia> abstract type AbstractS_Immut{Y} <: AbstractS{Y} end + +julia> mutable struct S_Mut{Y} <: AbstractS_Mut{Y} + const x::Int + y::Y + z::Float64 + end + +julia> struct S_Immut{Y} <: AbstractS_Immut{Y} + x::Int + y::Y + z::Float64 + end + +julia> const S = Union{S_Immut{Y}, S_Mut{Y}} where Y ``` It is then possible to create instances of the specified version with