import * as QR from '../QueryResult' ; import { Semigroup } from 'fp-ts/lib/Semigroup' ; returns example export function keepQueryResultSemigroup < L , P > ( ) { return { concat : ( a , b ) => a . _tag === 'Success' && b . _tag === 'Loading' ? QR . queryResultSuccess ( a . success , true ) : a . _tag === 'Failure' && b . _tag === 'Loading' ? QR . queryResultFailure ( a . failure , true ) : b } ; } returns example export function lastQueryResultSemigroup < L , P > ( ) { return { concat : ( _ , b ) => b } ; }