Skip to content

Commit

Permalink
Prepare for ghūl port (#63)
Browse files Browse the repository at this point in the history
- Prepare to port from C# to ghūl, by creating a new static factory class for the compiler to reference with a different name to differentiate the two implementations
  • Loading branch information
degory committed Feb 7, 2024
1 parent 8b86490 commit 8c8fcde
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ghul-pipes/Pipe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ public class Pipe {
}
}

public class Factory {
public static Pipe<T> From<T>(IEnumerable<T> source) {
if (source != null) {
return Pipe<T>.From(source);
} else {
return null;
}
}
}

public struct Maybe {
public static Maybe<T> From<T>(T value) => new Maybe<T>(value);
}
Expand Down

0 comments on commit 8c8fcde

Please sign in to comment.