import { curry } from '@typed/lambda' ; import { chain } from './chain' ; import { map } from './map' ; import { RemoteData } from './RemoteData' ; name export const ap = curry ( __ap ) as { < A , B , C > ( fn , value ) : RemoteData < A , C > ; < A , B , C > ( fn ) : ( value : RemoteData < A , B > ) => RemoteData < A , C > ; } ; function __ap < A , B , C > ( fn , value ) { return chain ( ( f ) => map ( f , value ) , fn ) ; }