These consolidated appeals present the issue whether RSA 620:9, rather than RSA 642:6 (1974 & Supp. 1983), governs the crime of escape from a house of correction. The trial courts ruled in the negative, on the ground that the former statute has been repealed by implication. We affirm.
*534In case No. 85-004, the defendant, Scott Perra, was discovered missing from his assigned work detail at the Sullivan County House of Correction on March 2,1984. Police officers arrested him twenty-four days later, at his mother’s home in Newport. The defendant was indicted for escape under RSA 642:6 (1974 & Supp. 1983), which classifies the offense as a class B felony.
The defendant moved to dismiss the indictment, relying on RSA 620:9, which proscribes escape from a house of correction, and which classifies the offense as a misdemeanor. See RSA 620:9 (specifying a punishment of “imprisonment or confinement for not more than one year”); RSA 625:9, IV (“[a] misdemeanor is any crime . . . for which the maximum penalty, exclusive of fine, is imprisonment not in excess of one year”). According to the defendant, RSA 620:9 is a more specific provision than RSA 642:6, and hence is the sole applicable statute in the instant case. The defendant argued that to construe both RSA 620:9 and RSA 642:6 as applying to his conduct would violate the principle that every offense is either a felony, a misdemeanor, or a violation. RSA 625:9, II. In addition, he contended that to permit the State to have the option of treating him as either a felon or a misdemeanant would violate his constitutional rights to equal protection and due process, see U.S. CONST, amend. XIV, § 1; N.H. Const, pt. I, art. 15.
The Superior Court (DiClerico, J.) denied the motion, ruling that RSA 620:9 had been repealed by implication. Thereafter the defendant was tried before a jury and convicted. The Trial Court {Contas, J.) sentenced him to two to four years in the State prison, and this appeal followed.
In case No. 85-197, the defendant, Stuart Currier, failed to report to the Grafton County House of Correction after being ordered to serve thirty days there on weekends within a six and one-half month period. He was indicted under RSA 642:6 and RSA 651:24, which provides that a person who wilfully fails to report for confinement is deemed to have escaped from the institution to which he has been sentenced. The defendant pleaded guilty to the charge on February 5, 1985. At the sentencing hearing he argued that RSA 620:9, and not RSA 642:6, was applicable. The Superior Court {Johnson, J.) disagreed, and imposed a sentence that included one year in the house of correction, five years probation, and payment of a $1,000 fine. The defendant then petitioned for a writ of habeas corpus, again contending that he should have been charged with a misdemeanor under RSA 620:9, and not with a felony under RSA 642:6. The trial court denied the petition, and the defendant filed this appeal.
*535RSA 620:9, enacted in 1963, see Laws 1963, 122:1, is part of the chapter pertaining to houses of correction. The statute provides in part that “[i]f any offender shall escape from a house of correction he shall be punished by imprisonment or confinement for not more than one year.” In 1985 the legislature repealed the provision, effective January 1, 1986. Laws 1985, ch. 90.
RSA 642:6 was enacted as part of the Criminal Code in 1971. See Laws 1971, 518:1. The statute provides that anyone who “escapes from official custody” is guilty of a felony. RSA 642:6, I, III (1974 & Supp. 1983). “Official custody” is defined as “arrest, custody in a penal institution, an institution for confinement of juvenile offenders or other confinement pursuant to an order of a court.” RSA 642:6, II. If the offender “employs force against any person or threatens any person with a deadly weapon to effect the escape” he commits a class A felony. RSA 642:6, III (Supp. 1983). Otherwise he commits a class B felony. Id.
We first must decide whether RSA 620:9 was in force during the relevant period, as the defendants assert, ' or instead was repealed by implication when RSA 642:6 was enacted, as the State contends. It is undisputed that during the period relevant to these appeals RSA 620:9 had not been expressly repealed and was included in the Revised Statutes Annotated. It does not necessarily follow, however, that the statute remained in effect after the enactment of RSA 642:6. “A repeal may arise by necessary implication from the enactment of a subsequent act.” 1A A. Sutherland, Statutes and Statutory Construction § 23.09, at 332 (C. Sands 4th ed. N. Singer rev. 1985). See Sindt v. Gilfoyle, 124 N.H. 315, 318, 469 A.2d 1334, 1335-36 (1983).
The defendants’ argument has some force. They point out that the climate for repeal by implication is “frosty and inhospitable,” Opinion of the Justices, 107 N.H. 325, 328, 221 A.2d 255, 257 (1966), and that, absent evidence of “convincing force” that the legislature intended a repeal, the rule will not be invoked. State v. Wilton Railroad, 89 N.H. 59, 61-62, 192 A. 623, 625 (1937). They emphasize that repeal by implication will not be found if any reasonable construction of the statutes can avoid it. State v. Miller, 115 N.H. 662, 663, 348 A.2d 345, 346 (1975).
The defendants contend that the legislature did not intend to repeal RSA 620:9 when it enacted RSA 642:6. They point out that at the time RSA 642:6 was enacted four different statutes governed escapes from custody: RSA 578:9 (escape from jail or other place, other than prison, house of correction, or industrial school); RSA 622:12 (escape from prison by person serving life sentence); RSA *536622:13 (escape from prison by other person); and RSA 620:9 (escape from _house of correction). Thereafter one of these statutes was repealed, see Laws 1973, 532:26, XVII (repealing RSA 587:9), and two were amended so as to eliminate conflicts with RSA 642:6, see Laws 1975, 458:1, :2 (amending RSA 622:12, :13). However, the last of these statutes, RSA 620:9, was neither amended nor repealed until 1985. See Laws 1985, ch. 90. According to the defendants, the contrast between the fate of RSA 620:9, and that of its three sister escape statutes supports an inference that the legislature did not intend to repeal RSA 620:9 until it expressly did so in 1985.
The defendants also assert that a reasonable construction of RSA 620:9 and RSA'642:6 exists under which the two statutes can be harmonized. They argue that RSA 620:9, which refers to escape from “a house of correction,” is more specific than RSA 642:6, which pertains to escapes from “official custody” of all kinds. They invoke the rule that “where one statute deals with a subject in general terms, and another deals with a part of the same subject in a more detailed way, the latter will be regarded as an exception to the general enactment where the two conflict.” State v. Bell, 125 N.H. 425, 432, 480 A.2d 906, 911 (1984). The defendants urge that the statutes should be read in accordance with this rule to treat escape from a house of correction as a misdemeanor and all other escapes as felonies.
We do not believe, however, that RSA 620:9 and 642:6 can be so easily reconciled, or that the legislative history supports the defendants’ position. The all-encompassing definition of “official custody” in RSA 642:6 strongly supports an inference that the statute, enacted after RSA 620:9, was intended to govern escapes of all kinds, including escapes from houses of correction. See RSA 642:6, II. We cannot adopt the defendants’ proposed construction of the two statutes without ignoring the plenary nature of RSA 642:6.
Moreover, RSA 642:6, unlike RSA 620:9, is part of the Criminal Code. The Code, enacted in 1971, was conceived as a comprehensive and systematic revision of the criminal laws. See Laws 1967, 451:1 (appointing commission “to revise, codify and amend the criminal laws . . . and to arrange [them] in a systematic, annotated and condensed form”); N.H.S. Jour. 1641-42 (1971) (statement of Sen. Nixon). Like the rest of the Criminal Code, RSA 642:6 apparently was intended as a revision of the existing law. The comments accompanying the report on the proposed Criminal Code make clear that RSA 642:6 was meant to replace the pre-Code provisions governing escape, not to supplement them:
*537“New Hampshire statutes now punish escapes from a variety of institutions, i.e., RSA 620:9 (1967 supp.) (House of Correction); RSA 587:9 (jail or other place, other than prison, house of correction or industrial school); RSA 622:12 (escape from prison by person serving life sentence); RSA 622:13 (escape from prison by other prisoner). There is not a statute dealing with escape from arrest, prior to the time the arrested person is confined. This section includes escape from all confinements and grades the offense on the basis of the involvement of personal danger in the means used.”
Commission to Recommend Codification of Criminal Laws, Report § 587:6 comments (1969). The defendants’ contention that RSA 642:6 was intended to coexist with RSA 620:9 ignores the compelling historical evidence to the contrary.
The defendants’ argument contains an additional flaw. It would be anomalous to treat escapees from houses of correction as misdemeanants while treating escapees from all other forms of custody, including arrest and juvenile confinement, as felons. To contend, as do the defendants, that the legislature intended this anomaly strains credulity.
Although the legislature expressly repealed the other preCode escape statutes after enacting RSA 642:6, we need not infer from this circumstance that the legislature intended RSA 620:9 to remain in effect. In light of the comprehensiveness of RSA 642:6, a more persuasive explanation for the continued presence of RSA 620:9 in our statutory compilation is that the legislature overlooked it. Our function is to effectuate the legislature’s expressed intent, even when the legislature may have been careless in expressing it.
We have long held that “when the natural weight of all the competent evidence demonstrates that the purpose of the latter statute was to supersede the former, the latter statute will control although it does not expressly repeal the former law.” Ingersoll v. Williams, 118 N.H. 135, 138, 383 A.2d 1119, 1121 (1978). This is particularly true in cases involving a later penal statute that redefines an offense or prescribes a penalty different from the penalty specified in an earlier statute governing the same offense. See Rockingham County v. Chase, 75 N.H. 127, 71 A. 634 (1908) (automobile speed limits); State v. Otis, 42 N.H. 71 (1860) (public drunkenness). See also 1A A. Sutherland, supra § 23.26.
*538 We hold that RSA 620:9 was impliedly repealed by RSA 642:6, and that the defendants’ convictions under the latter statute were proper.
Affirmed.
Johnson, J., did not sit; the others concurred.