Skip to content

Commit

Permalink
Merge branch 'alex/update-samples' of github.com:microsoft/qsharp int…
Browse files Browse the repository at this point in the history
…o alex/update-samples
  • Loading branch information
sezna committed Aug 22, 2024
2 parents 5761b2a + bf235e7 commit 8d0f18b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Kata {

function ComplexAdd(x : Complex, y : Complex) : Complex {
// Extract real and imaginary components of the inputs.
let (a, b) = (y.Real, y.Imag);
let (a, b) = (x.Real, x.Imag);
// Implement your solution here...
return Complex(0., 0.);
}
Expand Down
2 changes: 1 addition & 1 deletion samples/language/Unit.qs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
// # Description
// The `Unit` type is the singleton type whose only value is ().
// Functions implicitly return `Unit` if no explicit or implicit
// Callables implicitly return `Unit` if no explicit or implicit
// return is specified.

function ExplicitReturn() : Unit {
Expand Down
4 changes: 2 additions & 2 deletions samples/language/Variables.qs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ function Main() : Unit {
Message($"Mutable Int after mutation: {mutableInt}");

// This is not mutation, rather, this is declaring a new variable
// entirely. mutable point = new Point3d { X = 0.0, Y = 0.0, Z = 0.0 };
// entirely.
let immutableInt = 43;
let immutableInt = 0; // The below line copies `point`, moves the X coordinate by +1.0,
let immutableInt = 0;
Message($"Shadowed Immutable Int: {immutableInt}");

// Structs can also be updated with a copy constructor and reassigned.
Expand Down

0 comments on commit 8d0f18b

Please sign in to comment.