```ts // 1/2の確率でエラーを返すAPIを想定したダミー関数 const asyncLoad = ( value: string, error: Error ): AsyncResult<{ value: string }, Error> => new Promise((resolve) => { setTimeout(() => { resolve(Math.random() > 0.5 ? ok({ value }) : err(error!)) }, 1000) }) ```