public static double go ( int k ) {
  if ( k == 0 ) return 0 ;
  if ( memo [ k ] != 0 ) return memo [ k ] ;
  double total = 1 ;
  for ( int i = 1 ;
  i <= k ;
  i ++ ) {
    total += f ( k , i ) * go ( k - i ) ;
  }
  total /= ( 1 - f ( k , 0 ) ) ;
  return memo [ k ] = total ;
}

public static double go ( int k ) { if ( k == 0 ) return 0 ; if ( memo [ k ] != 0 ) return memo [ k ] ; double total = 1 ; for ( int i = 1 ; i <= k ; i ++ ) { total += f ( k , i ) * go ( k - i ) ; } total /= ( 1 - f ( k , 0 ) ) ; return memo [ k ] = total ; }
(method_declaration (modifiers) type: (floating_point_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))) consequence: (return_statement (array_access array: (identifier) index: (identifier)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))) right: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier))))))))) (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal))))))) (return_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier)))))