Project

General

Profile

Actions

Feature #10068

closed

[PATCH] Implement monadic operator for Vector

Added by gogotanaka (Kazuki Tanaka) over 10 years ago. Updated about 10 years ago.

Status:
Closed
Target version:
[ruby-core:63847]

Description

Before

v = Vector[1, 2, 3]

 + v
=> NoMethodError: undefined method `+@' for Vector[1, 2, 3]:Vector

 - v
=> NoMethodError: undefined method `-@' for Vector[1, 2, 3]:Vector

After

v = Vector[1, 2, 3]

 + v
=> Vector[1, 2, 3]

 - v
=> Vector[-1, -2, -3]

Files

implement_uplus_for_vector.patch (842 Bytes) implement_uplus_for_vector.patch gogotanaka (Kazuki Tanaka), 07/19/2014 01:56 AM
implement_negate_for_vector.patch (1.25 KB) implement_negate_for_vector.patch gogotanaka (Kazuki Tanaka), 07/19/2014 01:56 AM

Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #10069: [PATCH] Implement monadic operator for MatrixClosedmarcandre (Marc-Andre Lafortune)07/19/2014Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0