This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Err, Ok, type Result, getValues } from './result'; | |
describe('Result', () => { | |
describe('Ok', () => { | |
test('should create an Ok result with the given value', () => { | |
const result = Ok('hello'); | |
expect(result.ok).toBe(true); | |
expect(result.unwrap()).toBe('hello'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics.Contracts; | |
using System.Runtime.CompilerServices; | |
public static class SpanSplitExtensions | |
{ | |
public ref struct Enumerable1<T> where T : IEquatable<T> | |
{ | |
public Enumerable1(ReadOnlySpan<T> span, T separator) | |
{ |