import { sum , pluck , median } from 'ramda' ; export const sumByProp = < T > ( prop , list ) : number => sum ( pluck ( prop , list ) ) || 0 ; export const medianByProp = < T > ( prop , list ) : number => median ( pluck ( prop , list ) ) || 0 ;